Package org.azd.abstractions
Class RequestHeaders
java.lang.Object
org.azd.abstractions.RequestHeaders
Container class to set the request headers.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the header name and value.void
add
(RequestHeaders requestHeaders) Adds a new request header object.void
add
(CustomHeader customHeader) Adds a custom header.void
clear()
Clears the headers.Get the headers.boolean
isEmpty()
Check if the header map os empty.void
Remove the header name.void
remove
(CustomHeader customHeader) Removes the custom header value.void
Replace a header value.void
replace
(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.
-