Class HttpHeaders
See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AcceptAccept header forapplication/atom+xml .static final AcceptAccept header forapplication/x-www-form-urlencoded .static final AcceptAccept header forapplication/json .static final AcceptAccept header forapplication/octet-stream .static final AcceptAccept header forapplication/soap+xml .static final AcceptAccept header forapplication/svg+xml .static final AcceptAccept header forapplication/xhtml+xml .static final AcceptAccept header forapplication/xml .static final AcceptAccept header forimage/bmp .static final AcceptAccept header forimage/gif .static final AcceptAccept header forimage/jpeg .static final AcceptAccept header forimage/png .static final AcceptAccept header forimage/svg+xml .static final AcceptAccept header forimage/tiff .static final AcceptAccept header forimage/webp .static final AcceptAccept header formultipart/form-data .static final AcceptAccept header fortext/html .static final AcceptAccept header fortext/plain .static final AcceptAccept header fortext/xml .static final AcceptAccept header for*/* (all media types).static final ContentTypeContent-Type forapplication/atom+xml .static final ContentTypeContent-Type forapplication/x-www-form-urlencoded .static final ContentTypeContent-Type forapplication/json .static final ContentTypeContent-Type forapplication/octet-stream .static final ContentTypeContent-Type forapplication/soap+xml .static final ContentTypeContent-Type forapplication/svg+xml .static final ContentTypeContent-Type forapplication/xhtml+xml .static final ContentTypeContent-Type forapplication/xml .static final ContentTypeContent-Type forimage/bmp .static final ContentTypeContent-Type forimage/gif .static final ContentTypeContent-Type forimage/jpeg .static final ContentTypeContent-Type forimage/png .static final ContentTypeContent-Type forimage/svg+xml .static final ContentTypeContent-Type forimage/tiff .static final ContentTypeContent-Type forimage/webp .static final ContentTypeContent-Type formultipart/form-data .static final ContentTypeContent-Type fortext/html .static final ContentTypeContent-Type fortext/plain .static final ContentTypeContent-Type fortext/xml .static final ContentTypeContent-Type for*/* (all media types). -
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 ContentDispositioncontentDispositionAttachment(String filename) Creates aContentDispositionheader for a response attachment with a quotedfilenameparameter.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 header forapplication/atom+xml . -
ACCEPT_APPLICATION_FORM_URLENCODED
Accept header forapplication/x-www-form-urlencoded . -
ACCEPT_APPLICATION_JSON
Accept header forapplication/json . -
ACCEPT_APPLICATION_OCTET_STREAM
Accept header forapplication/octet-stream . -
ACCEPT_APPLICATION_SOAP_XML
Accept header forapplication/soap+xml . -
ACCEPT_APPLICATION_SVG_XML
Accept header forapplication/svg+xml . -
ACCEPT_APPLICATION_XHTML_XML
Accept header forapplication/xhtml+xml . -
ACCEPT_APPLICATION_XML
Accept header forapplication/xml . -
ACCEPT_IMAGE_BMP
Accept header forimage/bmp . -
ACCEPT_IMAGE_GIF
Accept header forimage/gif . -
ACCEPT_IMAGE_JPEG
Accept header forimage/jpeg . -
ACCEPT_IMAGE_PNG
Accept header forimage/png . -
ACCEPT_IMAGE_SVG
Accept header forimage/svg+xml . -
ACCEPT_IMAGE_TIFF
Accept header forimage/tiff . -
ACCEPT_IMAGE_WEBP
Accept header forimage/webp . -
ACCEPT_MULTIPART_FORM_DATA
Accept header formultipart/form-data . -
ACCEPT_TEXT_HTML
Accept header fortext/html . -
ACCEPT_TEXT_PLAIN
Accept header fortext/plain . -
ACCEPT_TEXT_XML
Accept header fortext/xml . -
ACCEPT_WILDCARD
Accept header for*/* (all media types). -
CONTENTTYPE_APPLICATION_ATOM_XML
Content-Type forapplication/atom+xml . -
CONTENTTYPE_APPLICATION_FORM_URLENCODED
Content-Type forapplication/x-www-form-urlencoded . -
CONTENTTYPE_APPLICATION_JSON
Content-Type forapplication/json . -
CONTENTTYPE_APPLICATION_OCTET_STREAM
Content-Type forapplication/octet-stream . -
CONTENTTYPE_APPLICATION_SOAP_XML
Content-Type forapplication/soap+xml . -
CONTENTTYPE_APPLICATION_SVG_XML
Content-Type forapplication/svg+xml . -
CONTENTTYPE_APPLICATION_XHTML_XML
Content-Type forapplication/xhtml+xml . -
CONTENTTYPE_APPLICATION_XML
Content-Type forapplication/xml . -
CONTENTTYPE_IMAGE_BMP
Content-Type forimage/bmp . -
CONTENTTYPE_IMAGE_GIF
Content-Type forimage/gif . -
CONTENTTYPE_IMAGE_JPEG
Content-Type forimage/jpeg . -
CONTENTTYPE_IMAGE_PNG
Content-Type forimage/png . -
CONTENTTYPE_IMAGE_SVG
Content-Type forimage/svg+xml . -
CONTENTTYPE_IMAGE_TIFF
Content-Type forimage/tiff . -
CONTENTTYPE_IMAGE_WEBP
Content-Type forimage/webp . -
CONTENTTYPE_MULTIPART_FORM_DATA
Content-Type formultipart/form-data . -
CONTENTTYPE_TEXT_HTML
Content-Type fortext/html . -
CONTENTTYPE_TEXT_PLAIN
Content-Type fortext/plain . -
CONTENTTYPE_TEXT_XML
Content-Type fortext/xml . -
CONTENTTYPE_WILDCARD
Content-Type for*/* (all media types).
-
-
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 to create a header with no value.- Returns:
- A new header bean. Never
null . - Throws:
IllegalArgumentException- If name isnull or empty.
-
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 .
-
contentDispositionAttachment
Creates aContentDispositionheader for a response attachment with a quotedfilenameparameter.Equivalent to
ContentDisposition.attachment(String).- Parameters:
filename- Suggested download name. Must not benull , blank, or contain CR/LF.- Returns:
- A non-
null header. - Throws:
IllegalArgumentException- Iffilenameis invalid.
-
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. Must not benull .value- The header value. Can benull , in which case it is passed as-is (or stringified tonull ) to the bean's constructor.- 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. Must not benull .name- The header name. Can benull to use the name from the@Headerannotation.value- The header value. Can benull , in which case it is passed as-is (or stringified tonull ) to the bean's constructor.- 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. Can benull .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. Never
null . - Throws:
IllegalArgumentException- If 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. Never
null . - Throws:
IllegalArgumentException- If 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. Never
null . - Throws:
IllegalArgumentException- If 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. Never
null . - Throws:
IllegalArgumentException- If 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 .
-