Class HttpHeaders
See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final Accept
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
static final ContentType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final Accept
Creates a newAccept
header.static final Accept
accept
(Supplier<MediaRanges> value) Creates a newAccept
header with a delayed value.static final Accept
accept
(MediaRanges value) Creates a newAccept
header.static final Accept
Creates a newAccept
header.static final AcceptCharset
acceptCharset
(String value) Creates a newAcceptCharset
header.static final AcceptCharset
acceptCharset
(Supplier<StringRanges> value) Creates a newAcceptCharset
header with a delayed value.static final AcceptCharset
acceptCharset
(StringRanges value) Creates a newAcceptCharset
header.static final AcceptEncoding
acceptEncoding
(String value) Creates a newAcceptEncoding
header.static final AcceptEncoding
acceptEncoding
(Supplier<StringRanges> value) Creates a newAcceptEncoding
header with a delayed value.static final AcceptEncoding
acceptEncoding
(StringRanges value) Creates a newAcceptEncoding
header.static final AcceptLanguage
acceptLanguage
(String value) Creates a newAcceptLanguage
header.static final AcceptLanguage
acceptLanguage
(Supplier<StringRanges> value) Creates a newAcceptLanguage
header with a delayed value.static final AcceptLanguage
acceptLanguage
(StringRanges value) Creates a newAcceptLanguage
header.static final AcceptRanges
acceptRanges
(String value) Creates a newAcceptRanges
header.static final AcceptRanges
acceptRanges
(Supplier<String> value) Creates a newAcceptRanges
header with a delayed value.static final Age
Creates a newAge
header.static final Age
Creates a newAge
header.static final Age
Creates a newAge
header with a delayed value.static final Allow
Creates a newAllow
header.static final Allow
Creates a newAllow
header.static final Allow
Creates a newAllow
header with a delayed value.static final Authorization
authorization
(String value) Creates a newAuthorization
header.static final Authorization
authorization
(Supplier<String> value) Creates a newAuthorization
header with a delayed value.static final BasicHeader
basicHeader
(String name, Object value) Creates a newBasicHeader
header.static final BasicHeader
basicHeader
(String name, Supplier<?> value) Creates a newBasicHeader
header with a delayed value.static final BasicBooleanHeader
booleanHeader
(String name, Boolean value) Creates a newBasicBooleanHeader
header.static final BasicBooleanHeader
booleanHeader
(String name, String value) Creates a newBasicBooleanHeader
header.static final BasicBooleanHeader
booleanHeader
(String name, Supplier<Boolean> value) Creates a newBasicBooleanHeader
header with a delayed value.static final CacheControl
cacheControl
(String value) Creates a newCacheControl
header.static final CacheControl
cacheControl
(Supplier<String> value) Creates a newCacheControl
header with a delayed value.static boolean
Returnstrue if thecast(Object)
method can be used on the specified object.static Header
Utility method for converting an arbitrary object to aHeader
.static final ClientVersion
clientVersion
(String value) Creates a newClientVersion
header.static final ClientVersion
clientVersion
(Supplier<Version> value) Creates a newClientVersion
header with a delayed value.static final ClientVersion
clientVersion
(Version value) Creates a newClientVersion
header.static final Connection
connection
(String value) Creates a newConnection
header.static final Connection
connection
(Supplier<String> value) Creates a newConnection
header with a delayed value.static final ContentDisposition
contentDisposition
(String value) Creates a newContentDisposition
header.static final ContentDisposition
contentDisposition
(Supplier<StringRanges> value) Creates a newContentDisposition
header with a delayed value.static final ContentDisposition
contentDisposition
(StringRanges value) Creates a newContentDisposition
header.static final ContentEncoding
contentEncoding
(String value) Creates a newContentEncoding
header.static final ContentEncoding
contentEncoding
(Supplier<String> value) Creates a newContentEncoding
header with a delayed value.static final ContentLanguage
contentLanguage
(String value) Creates a newContentLanguage
header.static final ContentLanguage
contentLanguage
(String... value) Creates a newContentLanguage
header.static final ContentLanguage
contentLanguage
(Supplier<String[]> value) Creates a newContentLanguage
header with a delayed value.static final ContentLength
contentLength
(Long value) Creates a newContentLength
header.static final ContentLength
contentLength
(String value) Creates a newContentLength
header.static final ContentLength
contentLength
(Supplier<Long> value) Creates a newContentLength
header with a delayed value.static final ContentLocation
contentLocation
(String value) Creates a newContentLocation
header.static final ContentLocation
contentLocation
(URI value) Creates a newContentLocation
header.static final ContentLocation
contentLocation
(Supplier<URI> value) Creates a newContentLocation
header with a delayed value.static final ContentRange
contentRange
(String value) Creates a newContentRange
header.static final ContentRange
contentRange
(Supplier<String> value) Creates a newContentRange
header with a delayed value.static final ContentType
contentType
(String value) Creates a newContentType
header.static final ContentType
contentType
(Supplier<MediaType> value) Creates a newContentType
header with a delayed value.static final ContentType
contentType
(MediaType value) Creates a newContentType
header.static final BasicCsvHeader
Creates a newBasicCsvHeader
header.static final BasicCsvHeader
Creates a newBasicCsvHeader
header.static final BasicCsvHeader
Creates a newBasicCsvHeader
header with a delayed value.static final Date
Creates a newDate
header.static final Date
date
(ZonedDateTime value) Creates a newDate
header.static final Date
date
(Supplier<ZonedDateTime> value) Creates a newDate
header with a delayed value.static final BasicDateHeader
dateHeader
(String name, String value) Creates a newBasicDateHeader
header.static final BasicDateHeader
dateHeader
(String name, ZonedDateTime value) Creates a newBasicDateHeader
header.static final BasicDateHeader
dateHeader
(String name, Supplier<ZonedDateTime> value) Creates a newBasicDateHeader
header with a delayed value.static final Debug
Creates a newDebug
header.static final Debug
Creates a newDebug
header.static final Debug
Creates a newDebug
header with a delayed value.static final BasicEntityTagHeader
entityTagHeader
(String name, String value) Creates a newBasicEntityTagHeader
header.static final BasicEntityTagHeader
entityTagHeader
(String name, Supplier<EntityTag> value) Creates a newBasicEntityTagHeader
header with a delayed value.static final BasicEntityTagHeader
entityTagHeader
(String name, EntityTag value) Creates a newBasicEntityTagHeader
header.static final BasicEntityTagsHeader
entityTagsHeader
(String name, String value) Creates a newBasicEntityTagsHeader
header.static final BasicEntityTagsHeader
entityTagsHeader
(String name, Supplier<EntityTags> value) Creates a newBasicEntityTagsHeader
header with a delayed value.static final BasicEntityTagsHeader
entityTagsHeader
(String name, EntityTags value) Creates a newBasicEntityTagsHeader
header.static final ETag
Creates a newETag
header.static final ETag
Creates a newETag
header with a delayed value.static final ETag
Creates a newETag
header.static final Expect
Creates a newExpect
header.static final Expect
Creates a newExpect
header with a delayed value.static final Expires
Creates a newExpires
header.static final Expires
expires
(ZonedDateTime value) Creates a newExpires
header.static final Expires
expires
(Supplier<ZonedDateTime> value) Creates a newExpires
header with a delayed value.static final Forwarded
Creates a newForwarded
header.static final Forwarded
Creates a newForwarded
header with a delayed value.static final From
Creates a newFrom
header.static final From
Creates a newFrom
header with a delayed value.static final <T extends Header>
TCreates a newHeader
of the specified type.static final <T extends Header>
TCreates a newHeader
of the specified type.static final HeaderList
Instantiates a newHeaderList
.static HeaderList
headerList
(String... pairs) Creates a newHeaderList
initialized with the specified name/value pairs.static final HeaderList
headerList
(List<Header> headers) Creates a newHeaderList
initialized with the specified headers.static final HeaderList
headerList
(Header... headers) Creates a newHeaderList
initialized with the specified headers.static final Host
Creates a newHost
header.static final Host
Creates a newHost
header with a delayed value.static final IfMatch
Creates a newIfMatch
header.static final IfMatch
ifMatch
(Supplier<EntityTags> value) Creates a newIfMatch
header with a delayed value.static final IfMatch
ifMatch
(EntityTags value) Creates a newIfMatch
header.static final IfModifiedSince
ifModifiedSince
(String value) Creates a newIfModifiedSince
header.static final IfModifiedSince
ifModifiedSince
(ZonedDateTime value) Creates a newIfModifiedSince
header.static final IfModifiedSince
ifModifiedSince
(Supplier<ZonedDateTime> value) Creates a newIfModifiedSince
header with a delayed value.static final IfNoneMatch
ifNoneMatch
(String value) Creates a newIfNoneMatch
header.static final IfNoneMatch
ifNoneMatch
(Supplier<EntityTags> value) Creates a newIfNoneMatch
header with a delayed value.static final IfNoneMatch
ifNoneMatch
(EntityTags value) Creates a newIfNoneMatch
header.static final IfRange
Creates a newIfRange
header.static final IfRange
ifRange
(ZonedDateTime value) Creates a newIfRange
header.static final IfRange
Creates a newIfRange
header with a delayed value.static final IfRange
Creates a newIfRange
header.static final IfUnmodifiedSince
ifUnmodifiedSince
(String value) Creates a newIfUnmodifiedSince
header.static final IfUnmodifiedSince
ifUnmodifiedSince
(ZonedDateTime value) Creates a newIfUnmodifiedSince
header.static final IfUnmodifiedSince
ifUnmodifiedSince
(Supplier<ZonedDateTime> value) Creates a newIfUnmodifiedSince
header with a delayed value.static final BasicIntegerHeader
integerHeader
(String name, Integer value) Creates a newBasicIntegerHeader
header.static final BasicIntegerHeader
integerHeader
(String name, String value) Creates a newBasicIntegerHeader
header.static final BasicIntegerHeader
integerHeader
(String name, Supplier<Integer> value) Creates a newBasicIntegerHeader
header with a delayed value.static final LastModified
lastModified
(String value) Creates a newLastModified
header.static final LastModified
lastModified
(ZonedDateTime value) Creates a newLastModified
header.static final LastModified
lastModified
(Supplier<ZonedDateTime> value) Creates a newLastModified
header with a delayed value.static final Location
Creates a newLocation
header.static final Location
Creates a newLocation
header.static final Location
Creates a newLocation
header with a delayed value.static final BasicLongHeader
longHeader
(String name, Long value) Creates a newBasicLongHeader
header.static final BasicLongHeader
longHeader
(String name, String value) Creates a newBasicLongHeader
header.static final BasicLongHeader
longHeader
(String name, Supplier<Long> value) Creates a newBasicLongHeader
header with a delayed value.static final MaxForwards
maxForwards
(Integer value) Creates a newMaxForwards
header.static final MaxForwards
maxForwards
(String value) Creates a newMaxForwards
header.static final MaxForwards
maxForwards
(Supplier<Integer> value) Creates a newMaxForwards
header with a delayed value.static final BasicMediaRangesHeader
mediaRangesHeader
(String name, String value) Creates a newBasicMediaRangesHeader
header.static final BasicMediaRangesHeader
mediaRangesHeader
(String name, Supplier<MediaRanges> value) Creates a newBasicMediaRangesHeader
header with a delayed value.static final BasicMediaRangesHeader
mediaRangesHeader
(String name, MediaRanges value) Creates a newBasicMediaRangesHeader
header.static final BasicMediaTypeHeader
mediaTypeHeader
(String name, String value) Creates a newBasicMediaTypeHeader
header.static final BasicMediaTypeHeader
mediaTypeHeader
(String name, Supplier<MediaType> value) Creates a newBasicMediaTypeHeader
header with a delayed value.static final BasicMediaTypeHeader
mediaTypeHeader
(String name, MediaType value) Creates a newBasicMediaTypeHeader
header.static final NoTrace
Creates a newNoTrace
header.static final NoTrace
Creates a newNoTrace
header.static final NoTrace
Creates a newNoTrace
header with a delayed value.static final Origin
Creates a newOrigin
header.static final Origin
Creates a newOrigin
header with a delayed value.static final Pragma
Creates a newPragma
header.static final Pragma
Creates a newPragma
header with a delayed value.static final ProxyAuthenticate
proxyAuthenticate
(String value) Creates a newProxyAuthenticate
header.static final ProxyAuthenticate
proxyAuthenticate
(Supplier<String> value) Creates a newProxyAuthenticate
header with a delayed value.static final ProxyAuthorization
proxyAuthorization
(String value) Creates a newProxyAuthorization
header.static final ProxyAuthorization
proxyAuthorization
(Supplier<String> value) Creates a newProxyAuthorization
header with a delayed value.static final Range
Creates a newRange
header.static final Range
Creates a newRange
header with a delayed value.static final Referer
Creates a newReferer
header.static final Referer
Creates a newReferer
header.static final Referer
Creates a newReferer
header with a delayed value.static final RetryAfter
retryAfter
(Integer value) Creates a newRetryAfter
header.static final RetryAfter
retryAfter
(String value) Creates a newRetryAfter
header.static final RetryAfter
retryAfter
(ZonedDateTime value) Creates a newRetryAfter
header.static final RetryAfter
retryAfter
(Supplier<?> value) Creates a newRetryAfter
header with a delayed value.static final SerializedHeader
serializedHeader
(String name, Object value) Creates a newSerializedHeader
header.static SerializedHeader
serializedHeader
(String name, Object value, HttpPartSerializerSession serializer, HttpPartSchema schema, boolean skipIfEmpty) Creates a newSerializedHeader
header.static final SerializedHeader
serializedHeader
(String name, Supplier<?> value) Creates a newSerializedHeader
header with a delayed value.static SerializedHeader
serializedHeader
(String name, Supplier<?> value, HttpPartSerializerSession serializer, HttpPartSchema schema, boolean skipIfEmpty) Creates a newSerializedHeader
header.static final Server
Creates a newServer
header.static final Server
Creates a newServer
header with a delayed value.static final BasicStringHeader
stringHeader
(String pair) Creates aBasicHeader
from a name/value pair string (e.g.static final BasicStringHeader
stringHeader
(String name, String value) Creates a newBasicStringHeader
header.static final BasicStringHeader
stringHeader
(String name, Supplier<String> value) Creates a newBasicStringHeader
header with a delayed value.static final BasicStringRangesHeader
stringRangesHeader
(String name, String value) Creates a newBasicStringRangesHeader
header.static final BasicStringRangesHeader
stringRangesHeader
(String name, Supplier<StringRanges> value) Creates a newBasicStringRangesHeader
header with a delayed value.static final BasicStringRangesHeader
stringRangesHeader
(String name, StringRanges value) Creates a newBasicStringRangesHeader
header.static final TE
Creates a newTE
header.static final TE
te
(Supplier<StringRanges> value) Creates a newTE
header with a delayed value.static final TE
te
(StringRanges value) Creates a newTE
header.static final Thrown
Creates a newThrown
header.static final Thrown
Creates a newThrown
header.static final Trailer
Creates a newTrailer
header.static final Trailer
Creates a newTrailer
header with a delayed value.static final TransferEncoding
transferEncoding
(String value) Creates a newTransferEncoding
header.static final TransferEncoding
transferEncoding
(Supplier<String> value) Creates a newTransferEncoding
header with a delayed value.static final Upgrade
Creates a newUpgrade
header.static final Upgrade
Creates a newUpgrade
header.static final Upgrade
Creates a newUpgrade
header with a delayed value.static final BasicUriHeader
Creates a newBasicUriHeader
header.static final BasicUriHeader
Creates a newBasicUriHeader
header.static final BasicUriHeader
Creates a newBasicUriHeader
header with a delayed value.static final UserAgent
Creates a newUserAgent
header.static final UserAgent
Creates a newUserAgent
header with a delayed value.static final Vary
Creates a newVary
header.static final Vary
Creates a newVary
header with a delayed value.static final Via
Creates a newVia
header.static final Via
Creates a newVia
header.static final Via
Creates a newVia
header with a delayed value.static final Warning
Creates a newWarning
header.static final Warning
Creates a newWarning
header with a delayed value.static final WwwAuthenticate
wwwAuthenticate
(String value) Creates a newWwwAuthenticate
header.static final WwwAuthenticate
wwwAuthenticate
(Supplier<String> value) Creates a newWwwAuthenticate
header with a delayed value.
-
Field Details
-
ACCEPT_APPLICATION_ATOM_XML
-
ACCEPT_APPLICATION_FORM_URLENCODED
-
ACCEPT_APPLICATION_JSON
-
ACCEPT_APPLICATION_OCTET_STREAM
-
ACCEPT_APPLICATION_SOAP_XML
-
ACCEPT_APPLICATION_SVG_XML
-
ACCEPT_APPLICATION_XHTML_XML
-
ACCEPT_APPLICATION_XML
-
ACCEPT_IMAGE_BMP
-
ACCEPT_IMAGE_GIF
-
ACCEPT_IMAGE_JPEG
-
ACCEPT_IMAGE_PNG
-
ACCEPT_IMAGE_SVG
-
ACCEPT_IMAGE_TIFF
-
ACCEPT_IMAGE_WEBP
-
ACCEPT_MULTIPART_FORM_DATA
-
ACCEPT_TEXT_HTML
-
ACCEPT_TEXT_PLAIN
-
ACCEPT_TEXT_XML
-
ACCEPT_WILDCARD
-
CONTENTTYPE_APPLICATION_ATOM_XML
-
CONTENTTYPE_APPLICATION_FORM_URLENCODED
-
CONTENTTYPE_APPLICATION_JSON
-
CONTENTTYPE_APPLICATION_OCTET_STREAM
-
CONTENTTYPE_APPLICATION_SOAP_XML
-
CONTENTTYPE_APPLICATION_SVG_XML
-
CONTENTTYPE_APPLICATION_XHTML_XML
-
CONTENTTYPE_APPLICATION_XML
-
CONTENTTYPE_IMAGE_BMP
-
CONTENTTYPE_IMAGE_GIF
-
CONTENTTYPE_IMAGE_JPEG
-
CONTENTTYPE_IMAGE_PNG
-
CONTENTTYPE_IMAGE_SVG
-
CONTENTTYPE_IMAGE_TIFF
-
CONTENTTYPE_IMAGE_WEBP
-
CONTENTTYPE_MULTIPART_FORM_DATA
-
CONTENTTYPE_TEXT_HTML
-
CONTENTTYPE_TEXT_PLAIN
-
CONTENTTYPE_TEXT_XML
-
CONTENTTYPE_WILDCARD
-
-
Constructor Details
-
HttpHeaders
public HttpHeaders()
-
-
Method Details
-
accept
Creates a newAccept
header.- Parameters:
value
- The header value.
Must be parsable byMediaRanges.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
accept
Creates a newAccept
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
accept
Creates a newAccept
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
accept
Creates a newAccept
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptCharset
Creates a newAcceptCharset
header.- Parameters:
value
- The header value.
Must be parsable byStringRanges.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptCharset
Creates a newAcceptCharset
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptCharset
Creates a newAcceptCharset
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptEncoding
Creates a newAcceptEncoding
header.- Parameters:
value
- The header value.
Must be parsable byStringRanges.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptEncoding
Creates a newAcceptEncoding
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptEncoding
Creates a newAcceptEncoding
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptLanguage
Creates a newAcceptLanguage
header.- Parameters:
value
- The header value.
Must be parsable byStringRanges.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptLanguage
Creates a newAcceptLanguage
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptLanguage
Creates a newAcceptLanguage
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptRanges
Creates a newAcceptRanges
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptRanges
Creates a newAcceptRanges
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
age
Creates a newAge
header.- Parameters:
value
- The header value.
Must be parsable usingInteger.parseInt(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
age
Creates a newAge
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
age
Creates a newAge
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
allow
Creates a newAllow
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
allow
Creates a newAllow
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
allow
Creates a newAllow
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
authorization
Creates a newAuthorization
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
authorization
Creates a newAuthorization
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
cacheControl
Creates a newCacheControl
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
cacheControl
Creates a newCacheControl
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
clientVersion
Creates a newClientVersion
header.- Parameters:
value
- The header value.
Must be parsable byVersion.of(String)
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
clientVersion
Creates a newClientVersion
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
clientVersion
Creates a newClientVersion
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
connection
Creates a newConnection
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
connection
Creates a newConnection
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentDisposition
Creates a newContentDisposition
header.- Parameters:
value
- The header value.
Must be parsable byStringRanges.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentDisposition
Creates a newContentDisposition
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentDisposition
Creates a newContentDisposition
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentEncoding
Creates a newContentEncoding
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentEncoding
Creates a newContentEncoding
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLanguage
Creates a newContentLanguage
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLanguage
Creates a newContentLanguage
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLanguage
Creates a newContentLanguage
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLength
Creates a newContentLength
header.- Parameters:
value
- The header value.
Must be parsable usingLong.parseLong(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLength
Creates a newContentLength
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLength
Creates a newContentLength
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLocation
Creates a newContentLocation
header.- Parameters:
value
- The header value.
Must be parsable byURI.create(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLocation
Creates a newContentLocation
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLocation
Creates a newContentLocation
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentRange
Creates a newContentRange
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentRange
Creates a newContentRange
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentType
Creates a newContentType
header.- Parameters:
value
- The header value.
Must be parsable byMediaType.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentType
Creates a newContentType
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentType
Creates a newContentType
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
date
Creates a newDate
header.- Parameters:
value
- The header value.
Must be an RFC-1123 formated string (e.g."Sat, 29 Oct 1994 19:43:31 GMT" ).
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
date
Creates a newDate
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
date
Creates a newDate
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
debug
Creates a newDebug
header.- Parameters:
value
- The header value.
Must be parsable byBoolean.parseBoolean(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value wasnull .
-
debug
Creates a newDebug
header.- Parameters:
value
- The header value.
Must be parsable byBoolean.parseBoolean(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value wasnull .
-
debug
Creates a newDebug
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The header value supplier.
Can benull .- Returns:
- A new header bean, or
null if the value wasnull .
-
eTag
Creates a newETag
header.- Parameters:
value
- The header value.
Must be an entity tag value (e.g."\"xyzzy\"" ).
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
eTag
Creates a newETag
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
eTag
Creates a newETag
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
expect
Creates a newExpect
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
expect
Creates a newExpect
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
expires
Creates a newExpires
header.- Parameters:
value
- The header value.
Must be an RFC-1123 formated string (e.g."Sat, 29 Oct 1994 19:43:31 GMT" ).
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
expires
Creates a newExpires
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
expires
Creates a newExpires
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
forwarded
Creates a newForwarded
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
forwarded
Creates a newForwarded
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
from
Creates a newFrom
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
from
Creates a newFrom
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
host
Creates a newHost
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
host
Creates a newHost
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
ifMatch
Creates a newIfMatch
header.- Parameters:
value
- The header value.
Must be a comma-delimited list of entity validator values (e.g."\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"" ).
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
ifMatch
Creates a newIfMatch
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
ifMatch
Creates a newIfMatch
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
ifModifiedSince
Creates a newIfModifiedSince
header.- Parameters:
value
- The header value.
Must be an RFC-1123 formated string (e.g."Sat, 29 Oct 1994 19:43:31 GMT" ).
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
ifModifiedSince
Creates a newIfModifiedSince
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
ifModifiedSince
Creates a newIfModifiedSince
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
ifNoneMatch
Creates a newIfNoneMatch
header.- Parameters:
value
- The header value.
Must be a comma-delimited list of entity validator values (e.g."\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"" ).
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
ifNoneMatch
Creates a newIfNoneMatch
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
ifNoneMatch
Creates a newIfNoneMatch
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
ifRange
Creates a newIfRange
header.- Parameters:
value
- The header value.
Must be an RFC-1123 formated string (e.g."Sat, 29 Oct 1994 19:43:31 GMT" ).
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
ifRange
Creates a newIfRange
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
ifRange
Creates a newIfRange
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
ifRange
Creates a newIfRange
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Supplier must supply eitherEntityTag
orZonedDateTime
objects.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
ifUnmodifiedSince
Creates a newIfUnmodifiedSince
header.- Parameters:
value
- The header value.
Must be an RFC-1123 formated string (e.g."Sat, 29 Oct 1994 19:43:31 GMT" ).
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
ifUnmodifiedSince
Creates a newIfUnmodifiedSince
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
ifUnmodifiedSince
Creates a newIfUnmodifiedSince
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
lastModified
Creates a newLastModified
header.- Parameters:
value
- The header value.
Must be an RFC-1123 formated string (e.g."Sat, 29 Oct 1994 19:43:31 GMT" ).
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
lastModified
Creates a newLastModified
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
lastModified
Creates a newLastModified
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
location
Creates a newLocation
header.- Parameters:
value
- The header value.
Must be parsable byURI.create(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
location
Creates a newLocation
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
location
Creates a newLocation
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
maxForwards
Creates a newMaxForwards
header.- Parameters:
value
- The header value.
Must be parsable usingInteger.parseInt(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
maxForwards
Creates a newMaxForwards
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
maxForwards
Creates a newMaxForwards
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
noTrace
Creates a newNoTrace
header.- Parameters:
value
- The header value.
Must be parsable byBoolean.parseBoolean(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value wasnull .
-
noTrace
Creates a newNoTrace
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value wasnull .
-
noTrace
Creates a newNoTrace
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The header value supplier.
Can benull .- Returns:
- A new header bean, or
null if the value wasnull .
-
origin
Creates a newOrigin
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
origin
Creates a newOrigin
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
pragma
Creates a newPragma
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
pragma
Creates a newPragma
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
proxyAuthenticate
Creates a newProxyAuthenticate
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
proxyAuthenticate
Creates a newProxyAuthenticate
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
proxyAuthorization
Creates a newProxyAuthorization
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
proxyAuthorization
Creates a newProxyAuthorization
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
range
Creates a newRange
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
range
Creates a newRange
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
referer
Creates a newReferer
header.- Parameters:
value
- The header value.
Must be parsable byURI.create(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
referer
Creates a newReferer
header.- Parameters:
value
- The header value.
Must be parsable byURI.create(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
referer
Creates a newReferer
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
retryAfter
Creates a newRetryAfter
header.- Parameters:
value
- The header value.
Must be an RFC-1123 formated string (e.g."Sat, 29 Oct 1994 19:43:31 GMT" ) or an integer.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
retryAfter
Creates a newRetryAfter
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
retryAfter
Creates a newRetryAfter
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
retryAfter
Creates a newRetryAfter
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Supplier must supply eitherInteger
orZonedDateTime
objects.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
server
Creates a newServer
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
server
Creates a newServer
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
te
Creates a newTE
header.- Parameters:
value
- The header value.
Must be parsable byStringRanges.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
te
Creates a newTE
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
te
Creates a newTE
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
thrown
Creates a newThrown
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
thrown
Creates a newThrown
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
trailer
Creates a newTrailer
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
trailer
Creates a newTrailer
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
transferEncoding
Creates a newTransferEncoding
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
transferEncoding
Creates a newTransferEncoding
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
upgrade
Creates a newUpgrade
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
upgrade
Creates a newUpgrade
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
upgrade
Creates a newUpgrade
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
userAgent
Creates a newUserAgent
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
userAgent
Creates a newUserAgent
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
vary
Creates a newVary
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
vary
Creates a newVary
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
via
Creates a newVia
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
via
Creates a newVia
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
via
Creates a newVia
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
warning
Creates a newWarning
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
warning
Creates a newWarning
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
wwwAuthenticate
Creates a newWwwAuthenticate
header.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
wwwAuthenticate
Creates a newWwwAuthenticate
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
booleanHeader
Creates a newBasicBooleanHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be parsable byBoolean.parseBoolean(String)
.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
booleanHeader
Creates a newBasicBooleanHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
booleanHeader
Creates a newBasicBooleanHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
csvHeader
Creates a newBasicCsvHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be a comma-delimited list.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
csvHeader
Creates a newBasicCsvHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
csvHeader
Creates a newBasicCsvHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
dateHeader
Creates a newBasicDateHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be an RFC-1123 formated string (e.g."Sat, 29 Oct 1994 19:43:31 GMT" ).
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
dateHeader
Creates a newBasicDateHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
dateHeader
Creates a newBasicDateHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
entityTagsHeader
Creates a newBasicEntityTagsHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be a comma-delimited list of entity validator values (e.g."\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"" ).
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
entityTagsHeader
Creates a newBasicEntityTagsHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
entityTagsHeader
Creates a newBasicEntityTagsHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
entityTagHeader
Creates a newBasicEntityTagHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be an entity tag value (e.g."\"xyzzy\"" ).
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
entityTagHeader
Creates a newBasicEntityTagHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
entityTagHeader
Creates a newBasicEntityTagHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
integerHeader
Creates a newBasicIntegerHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be parsable usingInteger.parseInt(String)
.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
integerHeader
Creates a newBasicIntegerHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
integerHeader
Creates a newBasicIntegerHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
longHeader
Creates a newBasicLongHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be parsable byLong.parseLong(String)
.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
longHeader
Creates a newBasicLongHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be parsable byLong.parseLong(String)
.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
longHeader
Creates a newBasicLongHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
mediaRangesHeader
Creates a newBasicMediaRangesHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be parsable byMediaRanges.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
mediaRangesHeader
Creates a newBasicMediaRangesHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
mediaRangesHeader
public static final BasicMediaRangesHeader mediaRangesHeader(String name, Supplier<MediaRanges> value) Creates a newBasicMediaRangesHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The header value.
Must be parsable byMediaRanges.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
mediaTypeHeader
Creates a newBasicMediaTypeHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be parsable byMediaType.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
mediaTypeHeader
Creates a newBasicMediaTypeHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
mediaTypeHeader
Creates a newBasicMediaTypeHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
stringHeader
Creates aBasicHeader
from a name/value pair string (e.g."Foo: bar" )- Parameters:
pair
- The pair string.- Returns:
- A new header bean, or
null if the value wasnull .
-
basicHeader
Creates a newBasicHeader
header.- Parameters:
name
- The parameter name.value
- The parameter value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
basicHeader
Creates a newBasicHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
serializedHeader
Creates a newSerializedHeader
header.- Parameters:
name
- The header name.value
- The POJO to serialize as the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty.
-
serializedHeader
public static SerializedHeader serializedHeader(String name, Object value, HttpPartSerializerSession serializer, HttpPartSchema schema, boolean skipIfEmpty) Creates a newSerializedHeader
header.- Parameters:
name
- The HTTP header name name.value
- The POJO to serialize as the header value.serializer
- The serializer to use for serializing the value to a string value.schema
- The schema object that defines the format of the output.
Ifnull , defaults to the schema defined on the serializer.
If that's alsonull , defaults toHttpPartSchema.DEFAULT
.
Only used if serializer is schema-aware (e.g.OpenApiSerializer
).
Can also be aSupplier
.skipIfEmpty
- If value is a blank string, the value should return asnull .- Returns:
- A new header bean, or
null if the name isnull or empty.
-
serializedHeader
public static SerializedHeader serializedHeader(String name, Supplier<?> value, HttpPartSerializerSession serializer, HttpPartSchema schema, boolean skipIfEmpty) Creates a newSerializedHeader
header.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The HTTP header name name.value
- The supplier of the POJO to serialize as the header value.serializer
- The serializer to use for serializing the value to a string value.schema
- The schema object that defines the format of the output.
Ifnull , defaults to the schema defined on the serializer.
If that's alsonull , defaults toHttpPartSchema.DEFAULT
.
Only used if serializer is schema-aware (e.g.OpenApiSerializer
).
Can also be aSupplier
.skipIfEmpty
- If value is a blank string, the value should return asnull .- Returns:
- A new header bean, or
null if the name isnull or empty.
-
serializedHeader
Creates a newSerializedHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the POJO to serialize as the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty.
-
stringHeader
Creates a newBasicStringHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
stringHeader
Creates a newBasicStringHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
stringRangesHeader
Creates a newBasicStringRangesHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be parsable byStringRanges.of(String)
.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
stringRangesHeader
Creates a newBasicStringRangesHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
stringRangesHeader
public static final BasicStringRangesHeader stringRangesHeader(String name, Supplier<StringRanges> value) Creates a newBasicStringRangesHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
uriHeader
Creates a newBasicUriHeader
header.- Parameters:
name
- The header name.value
- The header value.
Must be parsable byURI.create(String)
.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
uriHeader
Creates a newBasicUriHeader
header.- Parameters:
name
- The header name.value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
uriHeader
Creates a newBasicUriHeader
header with a delayed value.Header value is re-evaluated on each call to
NameValuePair.getValue()
.- Parameters:
name
- The header name.value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
header
Creates a newHeader
of the specified type.The implementation class must have a public constructor taking in one of the following argument lists:
public X(StringheaderValue )public X(ObjectheaderValue )public X(StringheaderName , StringheaderValue )public X(StringheaderName , ObjectheaderValue )
- Type Parameters:
T
- The header implementation class.- Parameters:
type
- The header implementation class.name
- The header name.value
- The header value.- Returns:
- A new unmodifiable instance, never
null .
-
header
Creates a newHeader
of the specified type.Same as
header(Class, String, Object)
but the header name is pulled from the@Header(name)
or@Header(value)
annotations.- Type Parameters:
T
- The header implementation class.- Parameters:
type
- The header implementation class.value
- The header value.- Returns:
- A new unmodifiable instance, never
null .
-
headerList
Instantiates a newHeaderList
.- Returns:
- A new empty builder.
-
headerList
Creates a newHeaderList
initialized with the specified headers.- Parameters:
headers
- The headers to add to the list. Can benull .null entries are ignored.- Returns:
- A new unmodifiable instance, never
null .
-
headerList
Creates a newHeaderList
initialized with the specified headers.- Parameters:
headers
- The headers to add to the list.null entries are ignored.- Returns:
- A new unmodifiable instance, never
null .
-
headerList
Creates a newHeaderList
initialized with the specified name/value pairs.- Parameters:
pairs
- Initial list of pairs.
Must be an even number of parameters representing key/value pairs.- Returns:
- A new instance.
- Throws:
RuntimeException
- If odd number of parameters were specified.
-
canCast
Returnstrue if thecast(Object)
method can be used on the specified object.- Parameters:
o
- The object to check.- Returns:
true if thecast(Object)
method can be used on the specified object.
-
cast
Utility method for converting an arbitrary object to aHeader
.
-