Class HttpClient.Builder

java.lang.Object
com.symphony.bdk.http.api.HttpClient.Builder
Enclosing class:
HttpClient

public static class HttpClient.Builder extends Object
The HttpClient fluent builder.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • basePath

      public HttpClient.Builder basePath(String basePath)
      Add base path of the web resource target.
      Parameters:
      basePath - a base path of the web resource target.
      Returns:
      the updated builder.
    • header

      public HttpClient.Builder header(String key, String value)
      Add an arbitrary common header.
      Parameters:
      key - the name of the header.
      value - the value of the header.
      Returns:
      the updated builder.
    • cookie

      public HttpClient.Builder cookie(String key, String value)
      Add an arbitrary common cookie.
      Parameters:
      key - the name of the header.
      value - the value of the header.
      Returns:
      the updated builder.
    • keyStore

      public HttpClient.Builder keyStore(byte[] keyStore, String keyStorePassword)
      Add the Java key store to the Http client.
      Parameters:
      keyStore - the Java key store.
      keyStorePassword - the key store password.
      Returns:
      the updated builder.
    • trustStore

      public HttpClient.Builder trustStore(byte[] trustStore, String trustStorePassword)
      Add the Java trust store to the Http client.
      Parameters:
      trustStore - the Java trust store.
      trustStorePassword - the trust store password.
      Returns:
      the updated builder.
    • proxy

      public HttpClient.Builder proxy(String proxyHost, int proxyPort)
      Configure proxy host and port.
      Parameters:
      proxyHost - the proxy host name.
      proxyPort - the proxy port number.
      Returns:
      the updated builder.
    • proxyCredentials

      public HttpClient.Builder proxyCredentials(String proxyUser, String proxyPassword)
      Configure proxy credentials.
      Parameters:
      proxyUser - proxy username.
      proxyPassword - proxy password.
      Returns:
      the updated builder.
    • build

      public HttpClient build()