Skip to content

HTTP client addition

Compare
Choose a tag to compare
@polterguy polterguy released this 12 May 07:57
· 7832 commits to master since this release

This release contains an HTTP client that allows you to invoke HTTP REST endpoints with a single line of C#. You can find the HTTP client in "modules/magic.http", and you can consume it through dependency injection by simply adding an IHttpClient instance to (for instance) your controllers, at which point an HttpClient will be automatically injected into your CTOR invocations.

The HTTP client features some intelligent use of C# generics, which automatically transforms between your DTOs and JSON for you.

You can see some basic usage examples here.