Class HttpHeadersBuilder
java.lang.Object
com.contentgrid.opa.client.rest.client.jdk.HttpHeadersBuilder
- All Implemented Interfaces:
HttpRequestHeaders
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.contentgrid.opa.client.rest.http.HttpRequestHeaders
HttpRequestHeaders.Headers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds the given name value pair to the set of headers for this request.voidforEach(BiConsumer<String, List<String>> callback) Performs the provided callback for each header.Get an immutable list of header values for the given header name, possibly empty.Removes the header with the specified name, if present.Sets the given name value pair to the set of headers for this request.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.contentgrid.opa.client.rest.http.HttpRequestHeaders
accept, acceptCharset, contentType, contentType, getFirst
-
Constructor Details
-
HttpHeadersBuilder
public HttpHeadersBuilder()
-
-
Method Details
-
add
Description copied from interface:HttpRequestHeadersAdds the given name value pair to the set of headers for this request. The given value is added to the list of values for that name.- Specified by:
addin interfaceHttpRequestHeaders- Parameters:
headerName- the header nameheaderValue- the header value- Returns:
- this instance
-
set
Description copied from interface:HttpRequestHeadersSets the given name value pair to the set of headers for this request.- Specified by:
setin interfaceHttpRequestHeaders- Parameters:
headerName- the header nameheaderValues- the header values- Returns:
- this instance
-
remove
Description copied from interface:HttpRequestHeadersRemoves the header with the specified name, if present.- Specified by:
removein interfaceHttpRequestHeaders- Parameters:
headerName- the header name- Returns:
- this instance
-
get
Description copied from interface:HttpRequestHeadersGet an immutable list of header values for the given header name, possibly empty.- Specified by:
getin interfaceHttpRequestHeaders- Parameters:
headerName- the header name- Returns:
- the list of header values, or an empty list
-
forEach
Description copied from interface:HttpRequestHeadersPerforms the provided callback for each header.- Specified by:
forEachin interfaceHttpRequestHeaders
-