Package com.google.api.gax.httpjson
Class HttpHeadersUtils
java.lang.Object
com.google.api.gax.httpjson.HttpHeadersUtils
This class is for internal use only and is public for technical reasons.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable StringgetSingleHeader(Map<String, Object> headers, String name) Retrieves the single string value of a header by case-insensitive name from a headers map.static @Nullable StringgetUserAgentValue(Map<String, String> headersMap) static com.google.api.client.http.HttpHeadersstatic com.google.api.client.http.HttpHeaderssetHeaders(com.google.api.client.http.HttpHeaders headers, Map<String, String> headersMap)
-
Constructor Details
-
HttpHeadersUtils
public HttpHeadersUtils()
-
-
Method Details
-
getUserAgentValue
-
getSingleHeader
Retrieves the single string value of a header by case-insensitive name from a headers map.- Parameters:
headers- the map of header names to header valuesname- the case-insensitive header name to look up- Returns:
- the single string value of the header, or
nullif not found - Throws:
IllegalArgumentException- if multiple values are present for the header
-
setHeaders
-
setHeader
-