Package io.micronaut.http.client
Interface HttpClientFactory
- All Known Implementing Classes:
AbstractHttpClientFactory
public interface HttpClientFactory
A factory to create HTTP clients.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptioncreateClient(URL url) Create a newHttpClient.createClient(URL url, HttpClientConfiguration configuration) Create a newHttpClientwith the specified configuration.
-
Method Details
-
createClient
Create a newHttpClient. Note that this method should only be used outside of the context of an application. Within Micronaut useInjectto inject a client instead- Parameters:
url- The base URL- Returns:
- The client
-
createClient
Create a newHttpClientwith the specified configuration. Note that this method should only be used outside of the context of an application. Within Micronaut useInjectto inject a client instead- Parameters:
url- The base URLconfiguration- the client configuration- Returns:
- The client
- Since:
- 2.2.0
-