Share via


HttpClientFactory.Create Method (, [])

Creates a new instance of the HttpClient.

Namespace:  System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

Syntax

'Declaration
Public Shared Function Create ( _
    innerHandler As HttpMessageHandler, _
    ParamArray handlers As DelegatingHandler() _
) As HttpClient
'Usage
Dim innerHandler As HttpMessageHandler 
Dim handlers As DelegatingHandler()
Dim returnValue As HttpClient 

returnValue = HttpClientFactory.Create(innerHandler, _
    handlers)
public static HttpClient Create(
    HttpMessageHandler innerHandler,
    params DelegatingHandler[] handlers
)
public:
static HttpClient^ Create(
    HttpMessageHandler^ innerHandler, 
    ... array<DelegatingHandler^>^ handlers
)
static member Create : 
        innerHandler:HttpMessageHandler * 
        handlers:DelegatingHandler[] -> HttpClient
public static function Create(
    innerHandler : HttpMessageHandler, 
    ... handlers : DelegatingHandler[]
) : HttpClient

Parameters

  • innerHandler
    Type: HttpMessageHandler

    The inner handler which is responsible for processing the HTTP response messages.

  • handlers
    Type: DelegatingHandler[]

    The list of HTTP handler that delegates the processing of HTTP response messages to another handler.

Return Value

Type: HttpClient
A new instance of the HttpClient.

See Also

Reference

HttpClientFactory Class

Create Overload

System.Net.Http Namespace