Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 1.42 KB

File metadata and controls

23 lines (14 loc) · 1.42 KB

HTTP

We use Microsoft.Extensions.Http for any HTTP related work.

For more documentation on HTTP requests, read the references listed at the bottom.

HTTP clients

  • You can register a service with a dependency to HttpClient using services.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.

Mocking

  • 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.

References