Interface WebHeaderBuilder<T extends WebHeaderBuilder<T>>

Type Parameters:
T - the type returned by the configuration methods
All Superinterfaces:
VerticalHeaderBuilder<T>
All Known Subinterfaces:
BraveWebRequest
All Known Implementing Classes:
BraveWebSearchRequest

public interface WebHeaderBuilder<T extends WebHeaderBuilder<T>> extends VerticalHeaderBuilder<T>
Configures the web-specific headers of a Brave web search request.

Extends VerticalHeaderBuilder with the geolocation and regional headers supported by web searches: latitude, longitude, timezone, country, city, state, state name, and postal code.

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

  • Method Details

    • withLatitude

      T withLatitude(double latitude)
      Adds a latitude header to the request.
      Parameters:
      latitude - the latitude value to set
      Returns:
      the current instance of WebHeaderBuilder
    • withLongitude

      T withLongitude(double longitude)
      Adds a longitude header to the request.
      Parameters:
      longitude - the longitude value to set
      Returns:
      the current instance of WebHeaderBuilder
    • withTimezone

      T withTimezone(@NotNull @NotNull ZoneId timezone)
      Adds a timezone header to the request.
      Parameters:
      timezone - the timezone value to set
      Returns:
      the current instance of WebHeaderBuilder
    • withCountry

      T withCountry(String country)
      Adds a country header to the request.
      Parameters:
      country - the country value to set
      Returns:
      the current instance of WebHeaderBuilder
    • withCity

      T withCity(String city)
      Adds a city header to the request.
      Parameters:
      city - the city value to set
      Returns:
      the current instance of WebHeaderBuilder
    • withState

      T withState(String state)
      Adds a state header to the request.
      Parameters:
      state - the state value to set
      Returns:
      the current instance of WebHeaderBuilder
    • withStateName

      T withStateName(String stateName)
      Adds a state name header to the request.
      Parameters:
      stateName - the state name value to set
      Returns:
      the current instance of WebHeaderBuilder
    • withPostalCode

      T withPostalCode(String postalCode)
      Adds a postal code header to the request.
      Parameters:
      postalCode - the postal code value to set
      Returns:
      the current instance of WebHeaderBuilder