Package com.ngrok
Class DefaultNgrokApiClient.Builder
java.lang.Object
com.ngrok.DefaultNgrokApiClient.Builder
- Enclosing class:
- DefaultNgrokApiClient
Builder class for the default API client.
-
Method Summary
Modifier and TypeMethodDescriptionSets the API base URI.Sets the API base URI.build()
Builds the ngrok API client instance.httpClient
(com.linecorp.armeria.client.WebClient httpClient) Sets the HTTP client to use to make requests.httpClient
(Optional<com.linecorp.armeria.client.WebClient> httpClient) Sets the HTTP client to use to make requests.objectMapper
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Sets the Jackson object mapper to use to serialize request bodies and deserialize response bodies.objectMapper
(Optional<com.fasterxml.jackson.databind.ObjectMapper> objectMapper) Sets the Jackson object mapper to use to serialize request bodies and deserialize response bodies.
-
Method Details
-
httpClient
Sets the HTTP client to use to make requests.- Parameters:
httpClient
- a HTTP client- Returns:
- the client builder
-
httpClient
public DefaultNgrokApiClient.Builder httpClient(Optional<com.linecorp.armeria.client.WebClient> httpClient) Sets the HTTP client to use to make requests.- Parameters:
httpClient
- an optional HTTP client- Returns:
- the client builder
-
baseUri
Sets the API base URI.- Parameters:
baseUri
- a URI- Returns:
- the client builder
- See Also:
-
baseUri
Sets the API base URI.- Parameters:
baseUri
- an optional URI- Returns:
- the client builder
- See Also:
-
objectMapper
public DefaultNgrokApiClient.Builder objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Sets the Jackson object mapper to use to serialize request bodies and deserialize response bodies. Be sure to pass something that can handleOptional
andOffsetDateTime
.- Parameters:
objectMapper
- an object mapper- Returns:
- the client builder
- See Also:
-
Jdk8Module
JavaTimeModule
-
objectMapper
public DefaultNgrokApiClient.Builder objectMapper(Optional<com.fasterxml.jackson.databind.ObjectMapper> objectMapper) Sets the Jackson object mapper to use to serialize request bodies and deserialize response bodies. Be sure to pass something that can handleOptional
andOffsetDateTime
.- Parameters:
objectMapper
- an object mapper- Returns:
- the client builder
- See Also:
-
Jdk8Module
JavaTimeModule
-
build
Builds the ngrok API client instance.- Returns:
- an api client
-