Class HttpClientHelper
A helper class for dealing with HTTPCLients especially within Blazor and other similar environments
Inheritance
System.Object
HttpClientHelper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: LemonEdge.Utils
Assembly: Utils.dll
Syntax
public class HttpClientHelper
Properties
DefaultHandler
The default handler to be used when creating HTTPClients
Declaration
public static Func<HttpMessageHandler> DefaultHandler { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.Net.Http.HttpMessageHandler> |
Methods
Create()
Creates a new HTTPCLient using the default handler
Declaration
public static HttpClient Create()
Returns
Type | Description |
---|---|
System.Net.Http.HttpClient | A new HTTPCLient using the default handler |
Create(HttpMessageHandler)
Creates a new HTTPClient using the specified handler
Declaration
public static HttpClient Create(HttpMessageHandler handler)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpMessageHandler | handler | The handler to use for the HTTPClient |
Returns
Type | Description |
---|---|
System.Net.Http.HttpClient | A new HTTPClient using the specified handler |