Class HttpHeaders
See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final Acceptstatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentTypestatic final ContentType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final AcceptCreates a newAcceptheader.static final Acceptaccept(Supplier<MediaRanges> value) Creates a newAcceptheader with a delayed value.static final Acceptaccept(MediaRanges value) Creates a newAcceptheader.static final AcceptCreates a newAcceptheader.static final AcceptCharsetacceptCharset(String value) Creates a newAcceptCharsetheader.static final AcceptCharsetacceptCharset(Supplier<StringRanges> value) Creates a newAcceptCharsetheader with a delayed value.static final AcceptCharsetacceptCharset(StringRanges value) Creates a newAcceptCharsetheader.static final AcceptEncodingacceptEncoding(String value) Creates a newAcceptEncodingheader.static final AcceptEncodingacceptEncoding(Supplier<StringRanges> value) Creates a newAcceptEncodingheader with a delayed value.static final AcceptEncodingacceptEncoding(StringRanges value) Creates a newAcceptEncodingheader.static final AcceptLanguageacceptLanguage(String value) Creates a newAcceptLanguageheader.static final AcceptLanguageacceptLanguage(Supplier<StringRanges> value) Creates a newAcceptLanguageheader with a delayed value.static final AcceptLanguageacceptLanguage(StringRanges value) Creates a newAcceptLanguageheader.static final AcceptRangesacceptRanges(String value) Creates a newAcceptRangesheader.static final AcceptRangesacceptRanges(Supplier<String> value) Creates a newAcceptRangesheader with a delayed value.static final AgeCreates a newAgeheader.static final AgeCreates a newAgeheader.static final AgeCreates a newAgeheader with a delayed value.static final AllowCreates a newAllowheader.static final AllowCreates a newAllowheader.static final AllowCreates a newAllowheader with a delayed value.static final Authorizationauthorization(String value) Creates a newAuthorizationheader.static final Authorizationauthorization(Supplier<String> value) Creates a newAuthorizationheader with a delayed value.static final BasicHeaderbasicHeader(String name, Object value) Creates a newBasicHeaderheader.static final BasicHeaderbasicHeader(String name, Supplier<?> value) Creates a newBasicHeaderheader with a delayed value.static final BasicBooleanHeaderbooleanHeader(String name, Boolean value) Creates a newBasicBooleanHeaderheader.static final BasicBooleanHeaderbooleanHeader(String name, String value) Creates a newBasicBooleanHeaderheader.static final BasicBooleanHeaderbooleanHeader(String name, Supplier<Boolean> value) Creates a newBasicBooleanHeaderheader with a delayed value.static final CacheControlcacheControl(String value) Creates a newCacheControlheader.static final CacheControlcacheControl(Supplier<String> value) Creates a newCacheControlheader with a delayed value.static booleanReturnstrue if thecast(Object)method can be used on the specified object.static HeaderUtility method for converting an arbitrary object to aHeader.static final ClientVersionclientVersion(String value) Creates a newClientVersionheader.static final ClientVersionclientVersion(Supplier<Version> value) Creates a newClientVersionheader with a delayed value.static final ClientVersionclientVersion(Version value) Creates a newClientVersionheader.static final Connectionconnection(String value) Creates a newConnectionheader.static final Connectionconnection(Supplier<String> value) Creates a newConnectionheader with a delayed value.static final ContentDispositioncontentDisposition(String value) Creates a newContentDispositionheader.static final ContentDispositioncontentDisposition(Supplier<StringRanges> value) Creates a newContentDispositionheader with a delayed value.static final ContentDispositioncontentDisposition(StringRanges value) Creates a newContentDispositionheader.static final ContentEncodingcontentEncoding(String value) Creates a newContentEncodingheader.static final ContentEncodingcontentEncoding(Supplier<String> value) Creates a newContentEncodingheader with a delayed value.static final ContentLanguagecontentLanguage(String value) Creates a newContentLanguageheader.static final ContentLanguagecontentLanguage(String... value) Creates a newContentLanguageheader.static final ContentLanguagecontentLanguage(Supplier<String[]> value) Creates a newContentLanguageheader with a delayed value.static final ContentLengthcontentLength(Long value) Creates a newContentLengthheader.static final ContentLengthcontentLength(String value) Creates a newContentLengthheader.static final ContentLengthcontentLength(Supplier<Long> value) Creates a newContentLengthheader with a delayed value.static final ContentLocationcontentLocation(String value) Creates a newContentLocationheader.static final ContentLocationcontentLocation(URI value) Creates a newContentLocationheader.static final ContentLocationcontentLocation(Supplier<URI> value) Creates a newContentLocationheader with a delayed value.static final ContentRangecontentRange(String value) Creates a newContentRangeheader.static final ContentRangecontentRange(Supplier<String> value) Creates a newContentRangeheader with a delayed value.static final ContentTypecontentType(String value) Creates a newContentTypeheader.static final ContentTypecontentType(Supplier<MediaType> value) Creates a newContentTypeheader with a delayed value.static final ContentTypecontentType(MediaType value) Creates a newContentTypeheader.static final BasicCsvHeaderCreates a newBasicCsvHeaderheader.static final BasicCsvHeaderCreates a newBasicCsvHeaderheader.static final BasicCsvHeaderCreates a newBasicCsvHeaderheader with a delayed value.static final DateCreates a newDateheader.static final Datedate(ZonedDateTime value) Creates a newDateheader.static final Datedate(Supplier<ZonedDateTime> value) Creates a newDateheader with a delayed value.static final BasicDateHeaderdateHeader(String name, String value) Creates a newBasicDateHeaderheader.static final BasicDateHeaderdateHeader(String name, ZonedDateTime value) Creates a newBasicDateHeaderheader.static final BasicDateHeaderdateHeader(String name, Supplier<ZonedDateTime> value) Creates a newBasicDateHeaderheader with a delayed value.static final DebugCreates a newDebugheader.static final DebugCreates a newDebugheader.static final DebugCreates a newDebugheader with a delayed value.static final BasicEntityTagHeaderentityTagHeader(String name, String value) Creates a newBasicEntityTagHeaderheader.static final BasicEntityTagHeaderentityTagHeader(String name, Supplier<EntityTag> value) Creates a newBasicEntityTagHeaderheader with a delayed value.static final BasicEntityTagHeaderentityTagHeader(String name, EntityTag value) Creates a newBasicEntityTagHeaderheader.static final BasicEntityTagsHeaderentityTagsHeader(String name, String value) Creates a newBasicEntityTagsHeaderheader.static final BasicEntityTagsHeaderentityTagsHeader(String name, Supplier<EntityTags> value) Creates a newBasicEntityTagsHeaderheader with a delayed value.static final BasicEntityTagsHeaderentityTagsHeader(String name, EntityTags value) Creates a newBasicEntityTagsHeaderheader.static final ETagCreates a newETagheader.static final ETagCreates a newETagheader with a delayed value.static final ETagCreates a newETagheader.static final ExpectCreates a newExpectheader.static final ExpectCreates a newExpectheader with a delayed value.static final ExpiresCreates a newExpiresheader.static final Expiresexpires(ZonedDateTime value) Creates a newExpiresheader.static final Expiresexpires(Supplier<ZonedDateTime> value) Creates a newExpiresheader with a delayed value.static final ForwardedCreates a newForwardedheader.static final ForwardedCreates a newForwardedheader with a delayed value.static final FromCreates a newFromheader.static final FromCreates a newFromheader with a delayed value.static final <T extends Header>
TCreates a newHeaderof the specified type.static final <T extends Header>
TCreates a newHeaderof the specified type.static final HeaderListInstantiates a newHeaderList.static HeaderListheaderList(String... pairs) Creates a newHeaderListinitialized with the specified name/value pairs.static final HeaderListheaderList(List<Header> headers) Creates a newHeaderListinitialized with the specified headers.static final HeaderListheaderList(Header... headers) Creates a newHeaderListinitialized with the specified headers.static final HostCreates a newHostheader.static final HostCreates a newHostheader with a delayed value.static final IfMatchCreates a newIfMatchheader.static final IfMatchifMatch(Supplier<EntityTags> value) Creates a newIfMatchheader with a delayed value.static final IfMatchifMatch(EntityTags value) Creates a newIfMatchheader.static final IfModifiedSinceifModifiedSince(String value) Creates a newIfModifiedSinceheader.static final IfModifiedSinceifModifiedSince(ZonedDateTime value) Creates a newIfModifiedSinceheader.static final IfModifiedSinceifModifiedSince(Supplier<ZonedDateTime> value) Creates a newIfModifiedSinceheader with a delayed value.static final IfNoneMatchifNoneMatch(String value) Creates a newIfNoneMatchheader.static final IfNoneMatchifNoneMatch(Supplier<EntityTags> value) Creates a newIfNoneMatchheader with a delayed value.static final IfNoneMatchifNoneMatch(EntityTags value) Creates a newIfNoneMatchheader.static final IfRangeCreates a newIfRangeheader.static final IfRangeifRange(ZonedDateTime value) Creates a newIfRangeheader.static final IfRangeCreates a newIfRangeheader with a delayed value.static final IfRangeCreates a newIfRangeheader.static final IfUnmodifiedSinceifUnmodifiedSince(String value) Creates a newIfUnmodifiedSinceheader.static final IfUnmodifiedSinceifUnmodifiedSince(ZonedDateTime value) Creates a newIfUnmodifiedSinceheader.static final IfUnmodifiedSinceifUnmodifiedSince(Supplier<ZonedDateTime> value) Creates a newIfUnmodifiedSinceheader with a delayed value.static final BasicIntegerHeaderintegerHeader(String name, Integer value) Creates a newBasicIntegerHeaderheader.static final BasicIntegerHeaderintegerHeader(String name, String value) Creates a newBasicIntegerHeaderheader.static final BasicIntegerHeaderintegerHeader(String name, Supplier<Integer> value) Creates a newBasicIntegerHeaderheader with a delayed value.static final LastModifiedlastModified(String value) Creates a newLastModifiedheader.static final LastModifiedlastModified(ZonedDateTime value) Creates a newLastModifiedheader.static final LastModifiedlastModified(Supplier<ZonedDateTime> value) Creates a newLastModifiedheader with a delayed value.static final LocationCreates a newLocationheader.static final LocationCreates a newLocationheader.static final LocationCreates a newLocationheader with a delayed value.static final BasicLongHeaderlongHeader(String name, Long value) Creates a newBasicLongHeaderheader.static final BasicLongHeaderlongHeader(String name, String value) Creates a newBasicLongHeaderheader.static final BasicLongHeaderlongHeader(String name, Supplier<Long> value) Creates a newBasicLongHeaderheader with a delayed value.static final MaxForwardsmaxForwards(Integer value) Creates a newMaxForwardsheader.static final MaxForwardsmaxForwards(String value) Creates a newMaxForwardsheader.static final MaxForwardsmaxForwards(Supplier<Integer> value) Creates a newMaxForwardsheader with a delayed value.static final BasicMediaRangesHeadermediaRangesHeader(String name, String value) Creates a newBasicMediaRangesHeaderheader.static final BasicMediaRangesHeadermediaRangesHeader(String name, Supplier<MediaRanges> value) Creates a newBasicMediaRangesHeaderheader with a delayed value.static final BasicMediaRangesHeadermediaRangesHeader(String name, MediaRanges value) Creates a newBasicMediaRangesHeaderheader.static final BasicMediaTypeHeadermediaTypeHeader(String name, String value) Creates a newBasicMediaTypeHeaderheader.static final BasicMediaTypeHeadermediaTypeHeader(String name, Supplier<MediaType> value) Creates a newBasicMediaTypeHeaderheader with a delayed value.static final BasicMediaTypeHeadermediaTypeHeader(String name, MediaType value) Creates a newBasicMediaTypeHeaderheader.static final NoTraceCreates a newNoTraceheader.static final NoTraceCreates a newNoTraceheader.static final NoTraceCreates a newNoTraceheader with a delayed value.static final OriginCreates a newOriginheader.static final OriginCreates a newOriginheader with a delayed value.static final PragmaCreates a newPragmaheader.static final PragmaCreates a newPragmaheader with a delayed value.static final ProxyAuthenticateproxyAuthenticate(String value) Creates a newProxyAuthenticateheader.static final ProxyAuthenticateproxyAuthenticate(Supplier<String> value) Creates a newProxyAuthenticateheader with a delayed value.static final ProxyAuthorizationproxyAuthorization(String value) Creates a newProxyAuthorizationheader.static final ProxyAuthorizationproxyAuthorization(Supplier<String> value) Creates a newProxyAuthorizationheader with a delayed value.static final RangeCreates a newRangeheader.static final RangeCreates a newRangeheader with a delayed value.static final RefererCreates a newRefererheader.static final RefererCreates a newRefererheader.static final RefererCreates a newRefererheader with a delayed value.static final RetryAfterretryAfter(Integer value) Creates a newRetryAfterheader.static final RetryAfterretryAfter(String value) Creates a newRetryAfterheader.static final RetryAfterretryAfter(ZonedDateTime value) Creates a newRetryAfterheader.static final RetryAfterretryAfter(Supplier<?> value) Creates a newRetryAfterheader with a delayed value.static final SerializedHeaderserializedHeader(String name, Object value) Creates a newSerializedHeaderheader.static SerializedHeaderserializedHeader(String name, Object value, HttpPartSerializerSession serializer, HttpPartSchema schema, boolean skipIfEmpty) Creates a newSerializedHeaderheader.static final SerializedHeaderserializedHeader(String name, Supplier<?> value) Creates a newSerializedHeaderheader with a delayed value.static SerializedHeaderserializedHeader(String name, Supplier<?> value, HttpPartSerializerSession serializer, HttpPartSchema schema, boolean skipIfEmpty) Creates a newSerializedHeaderheader.static final ServerCreates a newServerheader.static final ServerCreates a newServerheader with a delayed value.static final BasicStringHeaderstringHeader(String pair) Creates aBasicHeaderfrom a name/value pair string (e.g.static final BasicStringHeaderstringHeader(String name, String value) Creates a newBasicStringHeaderheader.static final BasicStringHeaderstringHeader(String name, Supplier<String> value) Creates a newBasicStringHeaderheader with a delayed value.static final BasicStringRangesHeaderstringRangesHeader(String name, String value) Creates a newBasicStringRangesHeaderheader.static final BasicStringRangesHeaderstringRangesHeader(String name, Supplier<StringRanges> value) Creates a newBasicStringRangesHeaderheader with a delayed value.static final BasicStringRangesHeaderstringRangesHeader(String name, StringRanges value) Creates a newBasicStringRangesHeaderheader.static final TECreates a newTEheader.static final TEte(Supplier<StringRanges> value) Creates a newTEheader with a delayed value.static final TEte(StringRanges value) Creates a newTEheader.static final ThrownCreates a newThrownheader.static final ThrownCreates a newThrownheader.static final TrailerCreates a newTrailerheader.static final TrailerCreates a newTrailerheader with a delayed value.static final TransferEncodingtransferEncoding(String value) Creates a newTransferEncodingheader.static final TransferEncodingtransferEncoding(Supplier<String> value) Creates a newTransferEncodingheader with a delayed value.static final UpgradeCreates a newUpgradeheader.static final UpgradeCreates a newUpgradeheader.static final UpgradeCreates a newUpgradeheader with a delayed value.static final BasicUriHeaderCreates a newBasicUriHeaderheader.static final BasicUriHeaderCreates a newBasicUriHeaderheader.static final BasicUriHeaderCreates a newBasicUriHeaderheader with a delayed value.static final UserAgentCreates a newUserAgentheader.static final UserAgentCreates a newUserAgentheader with a delayed value.static final VaryCreates a newVaryheader.static final VaryCreates a newVaryheader with a delayed value.static final ViaCreates a newViaheader.static final ViaCreates a newViaheader.static final ViaCreates a newViaheader with a delayed value.static final WarningCreates a newWarningheader.static final WarningCreates a newWarningheader with a delayed value.static final WwwAuthenticatewwwAuthenticate(String value) Creates a newWwwAuthenticateheader.static final WwwAuthenticatewwwAuthenticate(Supplier<String> value) Creates a newWwwAuthenticateheader 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 newAcceptheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
accept
Creates a newAcceptheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
accept
Creates a newAcceptheader.- 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 newAcceptheader 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 newAcceptCharsetheader.- 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 newAcceptCharsetheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptCharset
Creates a newAcceptCharsetheader 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 newAcceptEncodingheader.- 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 newAcceptEncodingheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptEncoding
Creates a newAcceptEncodingheader 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 newAcceptLanguageheader.- 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 newAcceptLanguageheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptLanguage
Creates a newAcceptLanguageheader 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 newAcceptRangesheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
acceptRanges
Creates a newAcceptRangesheader 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 newAgeheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
age
Creates a newAgeheader.- 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 newAgeheader 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 newAllowheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
allow
Creates a newAllowheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
allow
Creates a newAllowheader 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 newAuthorizationheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
authorization
Creates a newAuthorizationheader 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 .
-
basicHeader
Creates a newBasicHeaderheader.- 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 newBasicHeaderheader 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 .
-
booleanHeader
Creates a newBasicBooleanHeaderheader.- 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 newBasicBooleanHeaderheader.- 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 newBasicBooleanHeaderheader 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 .
-
cacheControl
Creates a newCacheControlheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
cacheControl
Creates a newCacheControlheader 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 .
-
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. -
clientVersion
Creates a newClientVersionheader.- 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 newClientVersionheader 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 newClientVersionheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
connection
Creates a newConnectionheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
connection
Creates a newConnectionheader 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 newContentDispositionheader.- 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 newContentDispositionheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentDisposition
Creates a newContentDispositionheader 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 newContentEncodingheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentEncoding
Creates a newContentEncodingheader 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 newContentLanguageheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLanguage
Creates a newContentLanguageheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLanguage
Creates a newContentLanguageheader 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 newContentLengthheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentLength
Creates a newContentLengthheader.- 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 newContentLengthheader 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 newContentLocationheader.- 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 newContentLocationheader 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 newContentLocationheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentRange
Creates a newContentRangeheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentRange
Creates a newContentRangeheader 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 newContentTypeheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
contentType
Creates a newContentTypeheader.- 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 newContentTypeheader 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 .
-
csvHeader
Creates a newBasicCsvHeaderheader.- 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 newBasicCsvHeaderheader.- 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 newBasicCsvHeaderheader 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 .
-
date
Creates a newDateheader.- 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 newDateheader 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 .
-
date
Creates a newDateheader.- Parameters:
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 newBasicDateHeaderheader.- 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 newBasicDateHeaderheader 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 newBasicDateHeaderheader.- 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 .
-
debug
Creates a newDebugheader.- 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 newDebugheader.- 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 newDebugheader 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 .
-
entityTagHeader
Creates a newBasicEntityTagHeaderheader.- 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 newBasicEntityTagHeaderheader.- 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 newBasicEntityTagHeaderheader 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 newBasicEntityTagsHeaderheader.- 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 newBasicEntityTagsHeaderheader.- 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 newBasicEntityTagsHeaderheader 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 .
-
eTag
Creates a newETagheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
eTag
Creates a newETagheader.- 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 newETagheader 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 newExpectheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
expect
Creates a newExpectheader 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 newExpiresheader.- 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 newExpiresheader 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 .
-
expires
Creates a newExpiresheader.- Parameters:
value- 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 newForwardedheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
forwarded
Creates a newForwardedheader 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 newFromheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
from
Creates a newFromheader 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 .
-
header
Creates a newHeaderof 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 .
-
header
Creates a newHeaderof 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 .
-
headerList
Instantiates a newHeaderList.- Returns:
- A new empty builder.
-
headerList
Creates a newHeaderListinitialized 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 newHeaderListinitialized 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 newHeaderListinitialized 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.
-
host
Creates a newHostheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
host
Creates a newHostheader 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 newIfMatchheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
ifMatch
Creates a newIfMatchheader.- 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 newIfMatchheader 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 newIfModifiedSinceheader.- 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 newIfModifiedSinceheader 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 .
-
ifModifiedSince
Creates a newIfModifiedSinceheader.- Parameters:
value- 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 newIfNoneMatchheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
ifNoneMatch
Creates a newIfNoneMatchheader.- 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 newIfNoneMatchheader 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 newIfRangeheader.- 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 newIfRangeheader.- 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 newIfRangeheader 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 eitherEntityTagorZonedDateTimeobjects.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
ifRange
Creates a newIfRangeheader.- 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 newIfUnmodifiedSinceheader.- 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 newIfUnmodifiedSinceheader 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 .
-
ifUnmodifiedSince
Creates a newIfUnmodifiedSinceheader.- Parameters:
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 newBasicIntegerHeaderheader.- 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 newBasicIntegerHeaderheader.- 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 newBasicIntegerHeaderheader 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 .
-
lastModified
Creates a newLastModifiedheader.- 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 newLastModifiedheader 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 newLastModifiedheader.- Parameters:
value- 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 newLocationheader.- 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 newLocationheader 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 .
-
location
Creates a newLocationheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
longHeader
Creates a newBasicLongHeaderheader.- 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 newBasicLongHeaderheader.- 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 newBasicLongHeaderheader 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 .
-
maxForwards
Creates a newMaxForwardsheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
maxForwards
Creates a newMaxForwardsheader.- 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 newMaxForwardsheader 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 .
-
mediaRangesHeader
Creates a newBasicMediaRangesHeaderheader.- 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
Creates a newBasicMediaRangesHeaderheader.- 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
public static final BasicMediaRangesHeader mediaRangesHeader(String name, Supplier<MediaRanges> value) Creates a newBasicMediaRangesHeaderheader 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 newBasicMediaTypeHeaderheader.- 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 newBasicMediaTypeHeaderheader.- 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 newBasicMediaTypeHeaderheader 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 .
-
noTrace
Creates a newNoTraceheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value wasnull .
-
noTrace
Creates a newNoTraceheader.- 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 newNoTraceheader 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 newOriginheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
origin
Creates a newOriginheader 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 newPragmaheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
pragma
Creates a newPragmaheader 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 newProxyAuthenticateheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
proxyAuthenticate
Creates a newProxyAuthenticateheader 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 newProxyAuthorizationheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
proxyAuthorization
Creates a newProxyAuthorizationheader 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 newRangeheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
range
Creates a newRangeheader 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 newRefererheader.- 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 newRefererheader 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 newRefererheader.- Parameters:
value- The header value.
Must be parsable byURI.create(String).
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
retryAfter
Creates a newRetryAfterheader.- 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 newRetryAfterheader.- 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 newRetryAfterheader 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 eitherIntegerorZonedDateTimeobjects.
Can benull .- Returns:
- A new header bean, or
null if the name isnull or empty or the value isnull .
-
retryAfter
Creates a newRetryAfterheader.- Parameters:
value- 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 newSerializedHeaderheader.- 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 newSerializedHeaderheader.- 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
Creates a newSerializedHeaderheader 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.
-
serializedHeader
public static SerializedHeader serializedHeader(String name, Supplier<?> value, HttpPartSerializerSession serializer, HttpPartSchema schema, boolean skipIfEmpty) Creates a newSerializedHeaderheader.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.
-
server
Creates a newServerheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
server
Creates a newServerheader 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 .
-
stringHeader
Creates aBasicHeaderfrom 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 .
-
stringHeader
Creates a newBasicStringHeaderheader.- 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 newBasicStringHeaderheader 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 newBasicStringRangesHeaderheader.- 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 newBasicStringRangesHeaderheader.- 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 newBasicStringRangesHeaderheader 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 .
-
te
Creates a newTEheader.- 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 newTEheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
te
Creates a newTEheader 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 newThrownheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
thrown
Creates a newThrownheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
trailer
Creates a newTrailerheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
trailer
Creates a newTrailerheader 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 newTransferEncodingheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
transferEncoding
Creates a newTransferEncodingheader 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 newUpgradeheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
upgrade
Creates a newUpgradeheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
upgrade
Creates a newUpgradeheader 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 .
-
uriHeader
Creates a newBasicUriHeaderheader.- 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 newBasicUriHeaderheader 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 newBasicUriHeaderheader.- 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 .
-
userAgent
Creates a newUserAgentheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
userAgent
Creates a newUserAgentheader 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 newVaryheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
vary
Creates a newVaryheader 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 newViaheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
via
Creates a newViaheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
via
Creates a newViaheader 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 newWarningheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
warning
Creates a newWarningheader 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 newWwwAuthenticateheader.- Parameters:
value- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
wwwAuthenticate
Creates a newWwwAuthenticateheader 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 .
-