HttpClientFactory.Create Method
Namespace: System.Net.Http
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Overload List
Name | Description | |
---|---|---|
Create(DelegatingHandler[]) | Creates a new instance of the HttpClient. |
|
Create(HttpMessageHandler, DelegatingHandler[]) | Creates a new instance of the HttpClient. |
See Also
HttpClientFactory Class
System.Net.Http Namespace
Return to top
HttpClientFactory.Create Method (DelegatingHandler[])
Creates a new instance of the HttpClient.
Syntax
public static HttpClient Create(
params DelegatingHandler[] handlers
)
public:
static HttpClient^ Create(
... array<DelegatingHandler^>^ handlers
)
static member Create :
[<ParamArrayAttribute>] handlers:DelegatingHandler[] -> HttpClient
Public Shared Function Create (
ParamArray handlers As DelegatingHandler()
) As HttpClient
Parameters
handlers
Type: System.Net.Http.DelegatingHandler[]The list of HTTP handler that delegates the processing of HTTP response messages to another handler.
Return Value
Type: System.Net.Http.HttpClient
A new instance of the HttpClient.
Return to top
HttpClientFactory.Create Method (HttpMessageHandler, DelegatingHandler[])
Creates a new instance of the HttpClient.
Syntax
public static HttpClient Create(
HttpMessageHandler innerHandler,
params DelegatingHandler[] handlers
)
public:
static HttpClient^ Create(
HttpMessageHandler^ innerHandler,
... array<DelegatingHandler^>^ handlers
)
static member Create :
innerHandler:HttpMessageHandler *
[<ParamArrayAttribute>] handlers:DelegatingHandler[] -> HttpClient
Public Shared Function Create (
innerHandler As HttpMessageHandler,
ParamArray handlers As DelegatingHandler()
) As HttpClient
Parameters
innerHandler
Type: System.Net.Http.HttpMessageHandlerThe inner handler which is responsible for processing the HTTP response messages.
handlers
Type: System.Net.Http.DelegatingHandler[]The list of HTTP handler that delegates the processing of HTTP response messages to another handler.
Return Value
Type: System.Net.Http.HttpClient
A new instance of the HttpClient.
Return to top