RestClient.Net is a cross-platform rest-client for .NET Core, .NET Framework, iOS, Android, WASM and UWP. It puts a wrapper over the .NET HttpClient API and allows you to write Rest client code that runs on any of the platforms. Version 4.0 of this library has been released, and I’d like to hear your feedback.

Major Changes

This is the Github release notes page that lists the issues the were fixed. The main problem with the previous version was that the client would attempt to deserialize responses that were non-successful. The library has been overhauled so that a useful exception is thrown instead.

Mocking has been made simpler by adding setters on all properties of requests and responses. This means that unit testing is more accessible.

Factories are now injected as delegates instead of interfaces. This is a breaking change This reduces boilerplate code. Check out this article about the approach.

All platforms now use System.Json.Text by default. This means that it is not necessary to create a serialization adapter unless you explicitly need to use Newtonsoft.

#software #.net #dependency injection #rest #restful #csharp

RestClient.Net Version 4.0
6.80 GEEK