Package com.azure.core.http
Interface HttpClientProvider
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface HttpClientProvider
An interface to be implemented by any azure-core plugin that wishes to provide an alternateHttpClientimplementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description HttpClientcreateInstance()Creates a new instance of theHttpClientthat this HttpClientProvider is configured to create.default HttpClientcreateInstance(HttpClientOptions clientOptions)Creates a new instance of theHttpClientthat this HttpClientProvider is configured to create.
-
-
-
Method Detail
-
createInstance
HttpClient createInstance()
Creates a new instance of theHttpClientthat this HttpClientProvider is configured to create.- Returns:
- A new
HttpClientinstance, entirely unrelated to all other instances that were created previously.
-
createInstance
default HttpClient createInstance(HttpClientOptions clientOptions)
Creates a new instance of theHttpClientthat this HttpClientProvider is configured to create.- Parameters:
clientOptions- Configuration options applied to the createdHttpClient.- Returns:
- A new
HttpClientinstance, entirely unrelated to all other instances that were created previously.
-
-