Package com.brightcove.player.network
Class HttpRequestConfig.Builder
java.lang.Object
com.brightcove.player.network.HttpRequestConfig.Builder
- Enclosing class:
- HttpRequestConfig
The HttpRequestConfig Builder.
-
Constructor Summary
ConstructorDescriptionBuilder()
Instantiates a new HttpRequestConfig.Builder.Builder
(HttpRequestConfig httpRequestConfig) Initializes the instance with the values from an#HttpRequestConfig
-
Method Summary
Modifier and TypeMethodDescriptionaddQueryParameter
(String queryParameterKey, String queryParameterValue) Adds an HTTP query parameteraddQueryParameters
(Map<String, String> queryParameters) Adds the HTTP request query parameters as a map of key-value pairs.addRequestHeader
(String headerKey, String headerValue) Adds an HTTP request headeraddRequestHeaders
(Map<String, String> requestHeaders) Adds the HTTP request headers as a map of key-value pairs.build()
Builds the HttpRequestConfig object.setBrightcoveAuthorizationToken
(String brightcoveAuthorizationToken) Sets the Brightcove authorization token.setCustomerRightsTokenConfig
(CustomerRightsTokenConfig customerRightsTokenConfig)
-
Constructor Details
-
Builder
public Builder()Instantiates a new HttpRequestConfig.Builder. -
Builder
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
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 keyheaderValue
- the header value- Returns:
- the builder instance
-
addQueryParameters
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 keyqueryParameterValue
- the query parameter value- Returns:
- the builder instance
-
build
Builds the HttpRequestConfig object.
-