Package com.ngrok

Class DefaultNgrokApiClient.Builder

java.lang.Object
com.ngrok.DefaultNgrokApiClient.Builder
Enclosing class:
DefaultNgrokApiClient

public static class DefaultNgrokApiClient.Builder extends Object
Builder class for the default API client.
  • Method Details

    • httpClient

      public DefaultNgrokApiClient.Builder httpClient(com.linecorp.armeria.client.WebClient 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

      public DefaultNgrokApiClient.Builder baseUri(URI baseUri)
      Sets the API base URI.
      Parameters:
      baseUri - a URI
      Returns:
      the client builder
      See Also:
    • baseUri

      public DefaultNgrokApiClient.Builder baseUri(Optional<URI> 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 handle Optional and OffsetDateTime.
      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 handle Optional and OffsetDateTime.
      Parameters:
      objectMapper - an object mapper
      Returns:
      the client builder
      See Also:
      • Jdk8Module
      • JavaTimeModule
    • build

      public DefaultNgrokApiClient build()
      Builds the ngrok API client instance.
      Returns:
      an api client