v1.2.0
Installation
Install via NuGet - either via the .NET CLI:
dotnet add package Skybrud.Essentials.Http --version 1.2.0
or the NuGet package manager:
Install-Package Skybrud.Essentials.Http -Version 1.2.0
Changelog
-
Added constructor overload to the
HttpExceptionclass (see ad19505)
TheHttpExceptionclass already had a constructor taking an instance ofIHttpResponse, but didn't allow specifying a custom exception message. The new constructor overload also take anIHttpResponsevia the first parameter, but then the exception message via the second parameter. -
Dropped .NET Standard 1.3 as a target framework (see ebeeced)
.NET Standard 1.3 probably isn't used that anymore, and supporting it meant a lot of compiler flags, so removing support for .NET Standard 1.3 also helps cleaning up the code. -
Removed all
DoHttp...style methods (see 1d7110a)
Earlier versions of the package had methods likeDoHttpGetRequestandDoHttpPostRequest, which overtime were replaced as the naming felt a bit clumsy. The methods have however remained in the package for legacy support, but as the methods have been marked as obsolete for a long time, and alternatives have existed in the package even longer, it's probably about time to remove the methods. -
Added misc async methods to the
HttpClientclass (see 7262fb5)
TheHttpClientclass have non-async methods likeGet,Postand similar. When I added async support to the package, I implemented similar methods for async, but as extension methods. These work fine, but the implementation may not always feel as elegant, so now theHttpClientclass has similarGetAsync,PostAsyncand similar methods. -
More
HttpClientparameters should allow null values (see 0e36692)
When support for nullable reference types were introduced to the package, not all parameters were decorated to allow null values. This release adds more nullable decorations to allow null values for parameters where the underlying logic already supports it.