Package io.micronaut.http.client.jdk
Class JdkHttpClientFactory
java.lang.Object
io.micronaut.http.client.AbstractHttpClientFactory<DefaultJdkHttpClient>
io.micronaut.http.client.jdk.JdkHttpClientFactory
- All Implemented Interfaces:
HttpClientFactory
Factory to create java.net.http.* HTTP Clients.
- Since:
- 4.0.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from class io.micronaut.http.client.AbstractHttpClientFactory
conversionService, mediaTypeCodecRegistry, messageBodyHandlerRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageBodyHandlerRegistry
protected DefaultJdkHttpClient
createHttpClient
(URI uri) Creates a newHttpClient
instance for a given URI.protected DefaultJdkHttpClient
createHttpClient
(URI uri, HttpClientConfiguration configuration) Creates a newHttpClient
instance for a given URI and configuration.Methods inherited from class io.micronaut.http.client.AbstractHttpClientFactory
createClient, createClient
-
Constructor Details
-
JdkHttpClientFactory
public JdkHttpClientFactory()
-
-
Method Details
-
createHttpClient
Description copied from class:AbstractHttpClientFactory
Creates a newHttpClient
instance for a given URI.- Specified by:
createHttpClient
in classAbstractHttpClientFactory<DefaultJdkHttpClient>
- Parameters:
uri
- The URI- Returns:
- The client
-
createHttpClient
Description copied from class:AbstractHttpClientFactory
Creates a newHttpClient
instance for a given URI and configuration.- Specified by:
createHttpClient
in classAbstractHttpClientFactory<DefaultJdkHttpClient>
- Parameters:
uri
- The URIconfiguration
- The configuration- Returns:
- The client
-
createDefaultMessageBodyHandlerRegistry
-