Generic features related to HTTP and HTTPS. Contains extensions to HttpContent, and cloning an HttpRequestMessage via the HttpRequestMessageCloner.
$ dotnet add package BarbezDotEu.HttpGeneric features related to HTTP and HTTPS. Contains extensions to HttpContent, and cloning an HttpRequestMessage via the HttpRequestMessageCloner.
typeBarbezDotEu.Http
Mocks headers that would've been sent typically by Microsoft Edge during the first half of 2021.
constructorConstructs a new EdgeMockingRequestHeaderCollection.
| Name | Type | Description |
|---|---|---|
| referrer | System.String | The referrer to set. |
| host | System.String | The value to set for the host header. Defaults to the domain of the referrer, if none provided. |
constantsGets an Edge style user agent header.
propertyGets Edge style accept headers.
propertyGets an Edge style accept header.
propertyGets an Edge style cache-control header.
propertyGets an Edge style connection header.
propertyGets the hostname.
propertyGets a collection of non-standard headers, including:
propertyGets an Edge style pragma header.
propertyGets an Edge style referrer header.
methodDetermines and sets the value of the host header. Defaults to the domain of the referrer, if no meaningful host name is provided.
| Name | Type | Description |
|---|---|---|
| host | System.String |
methodPrepares a given HttpRequestMessage with headers sent typically by Microsoft Edge during the first half of 2021.
| Name | Type | Description |
|---|---|---|
| httpRequestMessage | System.Net.Http.HttpRequestMessage | The HttpRequestMessage to adjust. |
typeBarbezDotEu.Http
Helper class for cloning HttpRequestMessages.
methodClones a given HttpRequestMessage.
This method has no parameters.
Using this method helps avoiding a "The request message was already sent. Cannot send the same request message multiple times." InvalidOperationException.
methodClones given HttpContent.
This method has no parameters.
typeBarbezDotEu.Http
Misc. extensions pertaining to HTTP and URI
methodGets a string representing an HTTP URI and returns it as an actual HTTP Uri.
An HTTP Uri.
| Name | Type | Description |
|---|---|---|
| uri | System.String | The implicit HTTP URI. |