次の方法で共有


HttpClientProvider Interface

public interface HttpClientProvider

An interface to be implemented by any azure-core plugin that wishes to provide an alternate HttpClient implementation.

Method Summary

Modifier and Type Method and Description
abstract HttpClient createInstance()

Creates a new instance of the HttpClient that this HttpClientProvider is configured to create.

default HttpClient createInstance(HttpClientOptions clientOptions)

Creates a new instance of the HttpClient that this HttpClientProvider is configured to create.

Method Details

createInstance

public abstract HttpClient createInstance()

Creates a new instance of the HttpClient that this HttpClientProvider is configured to create.

Returns:

A new HttpClient instance, entirely unrelated to all other instances that were created previously.

createInstance

public default HttpClient createInstance(HttpClientOptions clientOptions)

Creates a new instance of the HttpClient that this HttpClientProvider is configured to create.

Parameters:

clientOptions - Configuration options applied to the created HttpClient.

Returns:

A new HttpClient instance, entirely unrelated to all other instances that were created previously.

Applies to