Releases: skybrud/Skybrud.Essentials.Http
Skybrud.Essentials.Http v1.0.6
Installation
Changelog
-
Updated an issue with setting the content type of POST requests via the
HttpRequest
class (see 094eefd).
The content type would in some cases automatically be overwritten by the internal logic in theHttpRequest
. With this release, the internal logic will no longer set the content type if one has already been specified. -
Added constructor overloads and extra static methods to allow easier initialization of the
HttpRequest
class (see 0a2ed4c and 941e8d9).
TheHttpRequest
now has a number of new constructor overloads allowing developers to specify options such as the HTTP method and URL directly in the constructor instead of having to populate the corresponding properties after the instance has been created. -
The
IHttpRequest
interface should have the same properties as theHttpRequest
class (see 5f35656)
Technically this is a breaking change 💣, but only if you have your own classes implementing theIHttpResponse
interface.
Skybrud.Essentials.Http v1.0.5
Installation
Changelog
- The
ResponseUri
property from theHttpWebResponse
class is now exposed via theIHttpResponse
interface (see 5f35656)
Technically this is a breaking change 💣, but only if you have your own classes implementing theIHttpResponse
interface.
Skybrud.Essentials.Http v1.0.4
Skybrud.Essentials.Http v1.0.3
Installation
Changelog
-
Using
Uri.EscapeDataString
is more correct to encode form data (see 06a9ff8)
The old code usedStringUtils.UrlEncode
, which is just a wrapper for eitherHttpUtility.UrlEncode
orWebUtility.UrlEncode
depending on the target framework. TheUrlEncode
methods are not sufficient for encoding form data.The fix was to replace
StringUtils.UrlEncode
withUri.EscapeDataString
, as the latter properly handles encoding form data.
Skybrud.Essentials.Http v1.0.2
Installation
Changelog
- Fixed an issue with incorrect request body length due to multi-byte characters. As some characters may take up more than one byte, the length of
Encoding.UTF8.GetBytes(Body)
andBody.Length
could differ, causing the request code to fail (see f0561ab).