Package org.apache.juneau.http
Class HttpHeaders
java.lang.Object
org.apache.juneau.http.HttpHeaders
Static factory methods for creating common HTTP headers.
This is a convenience class that provides shorthand access to all named header types in
org.apache.juneau.http.header.
See Also:
- Since:
- 9.2.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic Acceptstatic Acceptaccept(MediaRanges value) static AcceptCharsetacceptCharset(String value) static AcceptCharsetacceptCharset(StringRanges value) static AcceptCharsetstatic AcceptCharsetacceptCharsetLazyWire(Supplier<String> value) static AcceptEncodingacceptEncoding(String value) static AcceptEncodingacceptEncoding(StringRanges value) static AcceptEncodingstatic AcceptEncodingacceptEncodingLazyWire(Supplier<String> value) static AcceptLanguageacceptLanguage(String value) static AcceptLanguageacceptLanguage(StringRanges value) static AcceptLanguagestatic AcceptLanguageacceptLanguageLazyWire(Supplier<String> value) static AcceptacceptLazyParsed(Supplier<MediaRanges> value) static AcceptacceptLazyWire(Supplier<String> value) static AcceptRangesacceptRanges(String value) static AcceptRangesacceptRanges(Supplier<String> value) static Ageage(int seconds) static Agestatic Allowstatic Allowstatic AllowallowLazyTokens(Supplier<String[]> tokenSupplier) static Authorizationauthorization(String value) static Authorizationauthorization(Supplier<String> value) static CacheControlcacheControl(String value) static CacheControlcacheControl(Supplier<String> value) static ClientVersionclientVersion(String value) static Connectionconnection(String value) static ContentDispositioncontentDisposition(String value) static ContentDispositioncontentDisposition(Supplier<StringRanges> value) static ContentDispositioncontentDisposition(StringRanges value) static ContentEncodingcontentEncoding(String value) static ContentLanguagecontentLanguage(String value) static ContentLengthcontentLength(long bytes) static ContentLengthcontentLength(String value) static ContentLocationcontentLocation(String value) static ContentLocationcontentLocation(URI uri) static ContentRangecontentRange(String value) static ContentTypecontentType(String value) static ContentTypecontentType(MediaType value) static ContentTypecontentTypeLazyParsed(Supplier<MediaType> value) static ContentTypecontentTypeLazyWire(Supplier<String> value) static Datestatic Datedate(ZonedDateTime value) static Debugdebug()static Debugstatic ETagstatic ETagstatic Expectstatic Expiresstatic Expiresexpires(ZonedDateTime value) static Forwardedstatic Fromstatic HttpHeaderCreates a genericHttpHeaderwith the given name and value.static HttpHeaderCreates a genericHttpHeaderwith a lazy value supplier.static Hoststatic IfMatchstatic IfMatchifMatch(EntityTags value) static IfModifiedSinceifModifiedSince(String value) static IfModifiedSinceifModifiedSince(ZonedDateTime value) static IfNoneMatchifNoneMatch(String value) static IfNoneMatchifNoneMatch(EntityTags value) static IfRangestatic IfRangeifRange(ZonedDateTime value) static IfRangestatic IfRangestatic IfUnmodifiedSinceifUnmodifiedSince(String value) static IfUnmodifiedSinceifUnmodifiedSince(ZonedDateTime value) static LastModifiedlastModified(String value) static LastModifiedlastModified(ZonedDateTime value) static Locationstatic Locationstatic MaxForwardsmaxForwards(int hops) static MaxForwardsmaxForwards(String value) static NoTracenoTrace()static NoTracestatic Originstatic Pragmastatic ProxyAuthenticateproxyAuthenticate(String value) static ProxyAuthorizationproxyAuthorization(String value) static Rangestatic Refererstatic Refererstatic RetryAfterretryAfter(int seconds) static RetryAfterretryAfter(String value) static RetryAfterretryAfter(ZonedDateTime value) static RetryAfterretryAfter(Supplier<?> value) static Serverstatic TEstatic TEte(StringRanges value) static TEteLazyParsed(Supplier<StringRanges> value) static TEteLazyWire(Supplier<String> value) static Thrownstatic Trailerstatic TransferEncodingtransferEncoding(String value) static Upgradestatic UserAgentstatic UserAgentstatic Varystatic Viastatic Warningstatic WwwAuthenticatewwwAuthenticate(String value)
-
Method Details
-
accept
- Parameters:
value- The header value. @return A new header.
-
acceptLazyWire
- Parameters:
value- Supplier of the wire header value. @return A new header.
-
accept
- Parameters:
value- Parsed media ranges. @return A new header.
-
acceptLazyParsed
- Parameters:
value- Supplier of parsed media ranges. @return A new header.
-
acceptCharset
- Parameters:
value- The header value. @return A new header.
-
acceptCharsetLazyWire
- Parameters:
value- Supplier of the wire header value. @return A new header.
-
acceptCharset
- Parameters:
value- Parsed string ranges. @return A new header.
-
acceptCharsetLazyParsed
- Parameters:
value- Supplier of string ranges. @return A new header.
-
acceptEncoding
- Parameters:
value- The header value. @return A new header.
-
acceptEncodingLazyWire
- Parameters:
value- Supplier of the wire header value. @return A new header.
-
acceptEncoding
- Parameters:
value- Parsed string ranges. @return A new header.
-
acceptEncodingLazyParsed
- Parameters:
value- Supplier of string ranges. @return A new header.
-
acceptLanguage
- Parameters:
value- The header value. @return A new header.
-
acceptLanguageLazyWire
- Parameters:
value- Supplier of the wire header value. @return A new header.
-
acceptLanguage
- Parameters:
value- Parsed string ranges. @return A new header.
-
acceptLanguageLazyParsed
- Parameters:
value- Supplier of string ranges. @return A new header.
-
acceptRanges
- Parameters:
value- The header value. @return A new header.
-
acceptRanges
- Parameters:
value- The header value supplier. @return A new header.
-
age
- Parameters:
value- The header value. @return A new header.
-
age
- Parameters:
seconds- Age in seconds. @return A new header.
-
allow
- Parameters:
value- The header value. @return A new header.
-
allow
- Parameters:
methods- Allowed methods. @return A new header.
-
allowLazyTokens
- Parameters:
tokenSupplier- Lazy token list. @return A new header.
-
authorization
- Parameters:
value- The header value. @return A new header.
-
authorization
- Parameters:
value- The header value supplier. @return A new header.
-
cacheControl
- Parameters:
value- The header value. @return A new header.
-
cacheControl
- Parameters:
value- The header value supplier. @return A new header.
-
connection
- Parameters:
value- The header value. @return A new header.
-
contentDisposition
- Parameters:
value- The header value. @return A new header.
-
contentDisposition
- Parameters:
value- Parsed string ranges. @return A new header.
-
contentDisposition
- Parameters:
value- Supplier of string ranges. @return A new header.
-
contentEncoding
- Parameters:
value- The header value. @return A new header.
-
contentLanguage
- Parameters:
value- The header value. @return A new header.
-
contentLength
- Parameters:
value- The header value. @return A new header.
-
contentLength
- Parameters:
bytes- The content length in bytes. @return A new header.
-
contentLocation
- Parameters:
value- The header value. @return A new header.
-
contentLocation
- Parameters:
uri- Content location URI. @return A new header.
-
contentRange
- Parameters:
value- The header value. @return A new header.
-
contentType
- Parameters:
value- The header value. @return A new header.
-
contentTypeLazyWire
- Parameters:
value- Supplier of the wire header value. @return A new header.
-
contentType
- Parameters:
value- Parsed media type. @return A new header.
-
contentTypeLazyParsed
- Parameters:
value- Supplier of media type. @return A new header.
-
date
- Parameters:
value- The header value. @return A new header.
-
date
- Parameters:
value- HTTP-date. @return A new header.
-
eTag
- Parameters:
value- The header value. @return A new header.
-
eTag
- Parameters:
value- Parsed entity-tag. @return A new header.
-
expect
- Parameters:
value- The header value. @return A new header.
-
expires
- Parameters:
value- The header value. @return A new header.
-
expires
- Parameters:
value- HTTP-date. @return A new header.
-
forwarded
- Parameters:
value- The header value. @return A new header.
-
from
- Parameters:
value- The header value. @return A new header.
-
host
- Parameters:
value- The header value. @return A new header.
-
ifMatch
- Parameters:
value- The header value. @return A new header.
-
ifMatch
- Parameters:
value- Parsed entity-tags. @return A new header.
-
ifModifiedSince
- Parameters:
value- The header value. @return A new header.
-
ifModifiedSince
- Parameters:
value- HTTP-date. @return A new header.
-
ifNoneMatch
- Parameters:
value- The header value. @return A new header.
-
ifNoneMatch
- Parameters:
value- Parsed entity-tags. @return A new header.
-
ifRange
- Parameters:
value- The header value. @return A new header.
-
ifRange
- Parameters:
value- Entity-tag. @return A new header.
-
ifRange
- Parameters:
value- HTTP-date. @return A new header.
-
ifRange
- Parameters:
value- Supplier of tag or date. @return A new header.
-
ifUnmodifiedSince
- Parameters:
value- The header value. @return A new header.
-
ifUnmodifiedSince
- Parameters:
value- HTTP-date. @return A new header.
-
lastModified
- Parameters:
value- The header value. @return A new header.
-
lastModified
- Parameters:
value- HTTP-date. @return A new header.
-
location
- Parameters:
value- The header value. @return A new header.
-
location
- Parameters:
uri- Redirect URI. @return A new header.
-
maxForwards
- Parameters:
value- The header value. @return A new header.
-
maxForwards
- Parameters:
hops- Max forwards count. @return A new header.
-
origin
- Parameters:
value- The header value. @return A new header.
-
pragma
- Parameters:
value- The header value. @return A new header.
-
proxyAuthenticate
- Parameters:
value- The header value. @return A new header.
-
proxyAuthorization
- Parameters:
value- The header value. @return A new header.
-
range
- Parameters:
value- The header value. @return A new header.
-
referer
- Parameters:
value- The header value. @return A new header.
-
referer
- Parameters:
uri- Referer URI. @return A new header.
-
retryAfter
- Parameters:
value- The header value. @return A new header.
-
retryAfter
- Parameters:
seconds- Delta seconds. @return A new header.
-
retryAfter
- Parameters:
value- HTTP-date. @return A new header.
-
retryAfter
- Parameters:
value- Supplier of seconds or date. @return A new header.
-
server
- Parameters:
value- The header value. @return A new header.
-
te
- Parameters:
value- The header value. @return A new header.
-
te
- Parameters:
value- Parsed string ranges. @return A new header.
-
teLazyWire
- Parameters:
value- Supplier of the wire header value. @return A new header.
-
teLazyParsed
- Parameters:
value- Supplier of string ranges. @return A new header.
-
trailer
- Parameters:
value- The header value. @return A new header.
-
transferEncoding
- Parameters:
value- The header value. @return A new header.
-
upgrade
- Parameters:
value- The header value. @return A new header.
-
userAgent
- Parameters:
value- The header value. @return A new header.
-
userAgent
- Parameters:
value- The header value supplier. @return A new header.
-
vary
- Parameters:
value- The header value. @return A new header.
-
via
- Parameters:
value- The header value. @return A new header.
-
warning
- Parameters:
value- The header value. @return A new header.
-
wwwAuthenticate
- Parameters:
value- The header value. @return A new header.
-
noTrace
- Parameters:
value- The header value. @return A new header.
-
noTrace
- Returns:
- A no-trace header with value
"true".
-
debug
- Parameters:
value- The header value. @return A new header.
-
debug
- Returns:
- A debug header with value
"true".
-
clientVersion
- Parameters:
value- The header value. @return A new header.
-
thrown
- Parameters:
value- The header value. @return A new header.
-
header
Creates a genericHttpHeaderwith the given name and value.- Parameters:
name- The header name. Must not benull .value- The header value. May benull .- Returns:
- A new header. Never
null .
-
header
Creates a genericHttpHeaderwith a lazy value supplier.- Parameters:
name- The header name. Must not benull .valueSupplier- Supplier for the header value. Must not benull .- Returns:
- A new header. Never
null .
-