Class HttpClientFactory
Creating a HttpClient is not very straightforward, that is why the logic is capsulated in the HttpClientFactory.
Inheritance
System.Object
HttpClientFactory
Namespace:Dapplo.HttpExtensions.Factory
Assembly:Dapplo.HttpExtensions.dll
Syntax
public class HttpClientFactory
Methods
| Improve this Doc View SourceCreate(Uri)
Create a HttpClient which is modified by the settings specified in the IHttpSettings of the HttpBehaviour. If nothing is passed, the GlobalSettings are used
Declaration
public static HttpClient Create(Uri uriForConfiguration = null)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uriForConfiguration | If a Uri is supplied, this is used to configure the HttpClient. Currently the Uri.UserInfo is used to set the basic authorization. |
Returns
Type | Description |
---|---|
System.Net.Http.HttpClient | HttpClient |