We use Microsoft.Extensions.Http for any HTTP related work.
For more documentation on HTTP requests, read the references listed at the bottom.
-
You can register a service with a dependency to
HttpClient
usingservices.AddHttpClient<IRepository, RepositoryImplementation>()
in the ApiConfiguration.cs file. -
We use
DelegatingHandler
to create HTTP request / response pipelines. There are lot of delegating handlers implementation in the community, we provide some in MallardMessageHandlers. -
We use Refit to generate the HTTP implementations in the data access layer.
- We use a simple
BaseMock
class to support mocking scenarios. You simply add embbedded resources (.json files) that contain the mocked responses into your project.