Package org.azd.abstractions
Class RequestHeaders
java.lang.Object
org.azd.abstractions.RequestHeaders
Container class to set the request headers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the header name and value.voidadd(RequestHeaders requestHeaders) Adds a new request header object.voidadd(CustomHeader customHeader) Adds a custom header.voidclear()Clears the headers.Get the headers.booleanisEmpty()Check if the header map os empty.voidRemove the header name.voidremove(CustomHeader customHeader) Removes the custom header value.voidReplace a header value.voidreplace(CustomHeader customHeader) Replaces the custom header value with the given value.
-
Constructor Details
-
RequestHeaders
public RequestHeaders()
-
-
Method Details
-
add
Adds a custom header.- Parameters:
customHeader- Custom header to addCustomHeader.
-
add
Adds a new request header object.- Parameters:
requestHeaders- Request headers to add.
-
remove
Removes the custom header value.- Parameters:
customHeader- Custom header to remove.
-
replace
Replaces the custom header value with the given value.- Parameters:
customHeader- Custom header to replace.
-
clear
public void clear()Clears the headers. -
add
Adds the header name and value.- Parameters:
name- Header name to add.value- Header value to add.
-
remove
Remove the header name.- Parameters:
name- Header name to remove.
-
replace
Replace a header value.- Parameters:
name- Header name.value- Header value to replace.
-
getHeaders
Get the headers.- Returns:
- Map of headers.
-
isEmpty
public boolean isEmpty()Check if the header map os empty.- Returns:
- True if the map is empty.
-