Class HttpRequestConfig.Builder

java.lang.Object
com.brightcove.player.network.HttpRequestConfig.Builder
Enclosing class:
HttpRequestConfig

public static class HttpRequestConfig.Builder extends Object
The HttpRequestConfig Builder.
  • Constructor Details

    • Builder

      public Builder()
      Instantiates a new HttpRequestConfig.Builder.
    • Builder

      public Builder(HttpRequestConfig httpRequestConfig)
      Initializes the instance with the values from an #HttpRequestConfig
      Parameters:
      httpRequestConfig - the HttpRequestConfig to initialize the builder.
  • Method Details

    • setBrightcoveAuthorizationToken

      public HttpRequestConfig.Builder setBrightcoveAuthorizationToken(@NonNull String brightcoveAuthorizationToken)
      Sets the Brightcove authorization token. Depending on your VideoCloud account configuration, this token might be required in order to successfully make certain requests.
      Parameters:
      brightcoveAuthorizationToken - the Brightcove authorization token
      Returns:
      the builder instance
    • setCustomerRightsTokenConfig

      public HttpRequestConfig.Builder setCustomerRightsTokenConfig(@NonNull CustomerRightsTokenConfig customerRightsTokenConfig)
    • addRequestHeaders

      public HttpRequestConfig.Builder addRequestHeaders(@Nullable Map<String,String> requestHeaders)
      Adds the HTTP request headers as a map of key-value pairs.
      Parameters:
      requestHeaders - the request headers map
      Returns:
      the builder instance
    • addRequestHeader

      public HttpRequestConfig.Builder addRequestHeader(@NonNull String headerKey, @NonNull String headerValue)
      Adds an HTTP request header
      Parameters:
      headerKey - the header key
      headerValue - the header value
      Returns:
      the builder instance
    • addQueryParameters

      public HttpRequestConfig.Builder addQueryParameters(@Nullable Map<String,String> queryParameters)
      Adds the HTTP request query parameters as a map of key-value pairs.
      Parameters:
      queryParameters - the query parameters
      Returns:
      the builder instance
    • addQueryParameter

      public HttpRequestConfig.Builder addQueryParameter(@NonNull String queryParameterKey, @NonNull String queryParameterValue)
      Adds an HTTP query parameter
      Parameters:
      queryParameterKey - the query parameter key
      queryParameterValue - the query parameter value
      Returns:
      the builder instance
    • build

      public HttpRequestConfig build()
      Builds the HttpRequestConfig object.