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
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 Summary
Modifier and TypeMethodDescriptionAdds a city header to the request.withCountry(String country) Adds a country header to the request.withLatitude(double latitude) Adds a latitude header to the request.withLongitude(double longitude) Adds a longitude header to the request.withPostalCode(String postalCode) Adds a postal code header to the request.Adds a state header to the request.withStateName(String stateName) Adds a state name header to the request.withTimezone(@NotNull ZoneId timezone) Adds a timezone header to the request.Methods inherited from interface net.ygbstudio.jbrave.core.builders.VerticalHeaderBuilder
withApiVersion, withCacheControl, withUserAgent
-
Method Details
-
withLatitude
Adds a latitude header to the request.- Parameters:
latitude- the latitude value to set- Returns:
- the current instance of
WebHeaderBuilder
-
withLongitude
Adds a longitude header to the request.- Parameters:
longitude- the longitude value to set- Returns:
- the current instance of
WebHeaderBuilder
-
withTimezone
Adds a timezone header to the request.- Parameters:
timezone- the timezone value to set- Returns:
- the current instance of
WebHeaderBuilder
-
withCountry
Adds a country header to the request.- Parameters:
country- the country value to set- Returns:
- the current instance of
WebHeaderBuilder
-
withCity
Adds a city header to the request.- Parameters:
city- the city value to set- Returns:
- the current instance of
WebHeaderBuilder
-
withState
Adds a state header to the request.- Parameters:
state- the state value to set- Returns:
- the current instance of
WebHeaderBuilder
-
withStateName
Adds a state name header to the request.- Parameters:
stateName- the state name value to set- Returns:
- the current instance of
WebHeaderBuilder
-
withPostalCode
Adds a postal code header to the request.- Parameters:
postalCode- the postal code value to set- Returns:
- the current instance of
WebHeaderBuilder
-