Base solution for your next web application
Open Closed

How to consume external service in application service layer? #10702


User avatar
0
dzungle created

Hello support team, We are using aspnetzero version 10.4 (netcore & angular). We need to consume an external service (rest api) in the application service layer. Could you please show us the best practice to do it in aspnetzero? Thank you in advance.

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

1 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @dzungle We may refer you to use IHttpClientFactory, see official documentation: https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)