Skip to content

v1.2.0

Latest
Compare
Choose a tag to compare
@abjerner abjerner released this 27 Jan 19:37
· 1 commit to v1/main since this release

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 HttpException class (see ad19505)
    The HttpException class already had a constructor taking an instance of IHttpResponse, but didn't allow specifying a custom exception message. The new constructor overload also take an IHttpResponse via 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 like DoHttpGetRequest and DoHttpPostRequest, 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 HttpClient class (see 7262fb5)
    The HttpClient class have non-async methods like Get, Post and 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 the HttpClient class has similar GetAsync, PostAsync and similar methods.

  • More HttpClient parameters 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.