Class HttpHeadersUtils (2.87.0)

public class HttpHeadersUtils

This class is for internal use only and is public for technical reasons.

Inheritance

java.lang.Object > HttpHeadersUtils

Static Methods

getSingleHeader(Map<String,Object> headers, String name)

public static @Nullable String getSingleHeader(Map<String,Object> headers, String name)

Retrieves the single string value of a header by case-insensitive name from a headers map.

Parameters
Name Description
headers Map<String,Object>

the map of header names to header values

name String

the case-insensitive header name to look up

Returns
Type Description
@org.jspecify.annotations.Nullable java.lang.String

the single string value of the header, or null if not found

getUserAgentValue(Map<String,String> headersMap)

public static @Nullable String getUserAgentValue(Map<String,String> headersMap)
Parameter
Name Description
headersMap Map<String,String>
Returns
Type Description
@org.jspecify.annotations.Nullable java.lang.String

setHeader(HttpHeaders headers, String key, String value)

public static HttpHeaders setHeader(HttpHeaders headers, String key, String value)
Parameters
Name Description
headers com.google.api.client.http.HttpHeaders
key String
value String
Returns
Type Description
com.google.api.client.http.HttpHeaders

setHeaders(HttpHeaders headers, Map<String,String> headersMap)

public static HttpHeaders setHeaders(HttpHeaders headers, Map<String,String> headersMap)
Parameters
Name Description
headers com.google.api.client.http.HttpHeaders
headersMap Map<String,String>
Returns
Type Description
com.google.api.client.http.HttpHeaders

Constructors

HttpHeadersUtils()

public HttpHeadersUtils()