Interface VerticalHeaderBuilder<T extends VerticalHeaderBuilder<T>>

Type Parameters:
T - the type returned by the configuration methods
All Known Subinterfaces:
BraveVerticalRequest, BraveWebRequest, WebHeaderBuilder<T>
All Known Implementing Classes:
BraveVerticalSearchRequest, BraveWebSearchRequest

public interface VerticalHeaderBuilder<T extends VerticalHeaderBuilder<T>>
Configures the standard headers of a Brave vertical search request.

The headers declared here are common to every vertical search request.

The subscription token is not configured here; use the query builder's withToken method instead.

  • Method Summary

    Modifier and Type
    Method
    Description
    withApiVersion(String apiVersion)
    Adds an API version header to the request.
    withCacheControl(String cacheControl)
    Adds a cache control header to the request.
    withUserAgent(String userAgent)
    Adds a user agent header to the request.
  • Method Details

    • withUserAgent

      T withUserAgent(String userAgent)
      Adds a user agent header to the request.
      Parameters:
      userAgent - the user agent value to set
      Returns:
      the current instance of VerticalHeaderBuilder
    • withCacheControl

      T withCacheControl(String cacheControl)
      Adds a cache control header to the request.
      Parameters:
      cacheControl - the cache control value to set
      Returns:
      the current instance of VerticalHeaderBuilder
    • withApiVersion

      T withApiVersion(String apiVersion)
      Adds an API version header to the request.
      Parameters:
      apiVersion - the API version value to set
      Returns:
      the current instance of VerticalHeaderBuilder