java.lang.Object
io.helidon.http.HeaderValues
Values of commonly used headers.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Header
Accept text/event-stream.static final Header
Accept application/json.static final Header
Accept byte ranges for file download.static final Header
Not accepting byte ranges for file download.static final Header
Accept text/plain with UTF-8.static final Header
Cache control without any caching.static final Header
Cache control that allows caching with no transform.static final Header
Connection close.static final Header
Connection keep-alive.static final Header
Content length with 0 value.static final Header
Content type SSE event stream.static final Header
Content type application/json with no charset.static final Header
Content type octet stream.static final Header
Content type text plain with no charset.static final Header
Expect 100 header.static final Header
TE header set totrailers
, used to enable trailer headers.static final Header
Chunked transfer encoding. -
Method Summary
Modifier and TypeMethodDescriptionstatic Header
create
(HeaderName name, boolean changing, boolean sensitive, int value) Create a new header.static Header
create
(HeaderName name, boolean changing, boolean sensitive, long value) Create a new header.static Header
create
(HeaderName name, boolean changing, boolean sensitive, String... values) Create a new header.static Header
create
(HeaderName name, int value) Create a new header with a single value.static Header
create
(HeaderName name, long value) Create a new header with a single value.static Header
create
(HeaderName name, LazyString value) Create a new header with a single value.static Header
create
(HeaderName name, String value) Create a new header with a single value.static Header
create
(HeaderName name, String... values) Create a new header.static Header
create
(HeaderName name, Collection<String> values) Create a new header.static Header
Create a new header with a single value.static Header
Create a new header with a single value.static Header
Create a new header with a single value.static Header
Create a new header.static Header
create
(String name, Collection<String> values) Create a new header.static Header
createCached
(HeaderName name, boolean changing, boolean sensitive, String value) Create and cache byte value.static Header
createCached
(HeaderName name, int value) Create and cache byte value.static Header
createCached
(HeaderName name, long value) Create and cache byte value.static Header
createCached
(HeaderName name, String value) Create and cache byte value.static Header
createCached
(String name, int value) Create and cache byte value.static Header
createCached
(String name, long value) Create and cache byte value.static Header
createCached
(String name, String value) Create and cache byte value.
-
Field Details
-
ACCEPT_RANGES_BYTES
Accept byte ranges for file download. -
ACCEPT_RANGES_NONE
Not accepting byte ranges for file download. -
TRANSFER_ENCODING_CHUNKED
Chunked transfer encoding. Used inHTTP/1
. -
CONNECTION_KEEP_ALIVE
Connection keep-alive. Used inHTTP/1
. -
CONNECTION_CLOSE
Connection close. Used inHTTP/1
. -
CONTENT_TYPE_JSON
Content type application/json with no charset. -
CONTENT_TYPE_TEXT_PLAIN
Content type text plain with no charset. -
CONTENT_TYPE_OCTET_STREAM
Content type octet stream. -
CONTENT_TYPE_EVENT_STREAM
Content type SSE event stream. -
ACCEPT_JSON
Accept application/json. -
ACCEPT_TEXT
Accept text/plain with UTF-8. -
ACCEPT_EVENT_STREAM
Accept text/event-stream. -
EXPECT_100
Expect 100 header. -
CONTENT_LENGTH_ZERO
Content length with 0 value. -
CACHE_NO_CACHE
Cache control without any caching. -
CACHE_NORMAL
Cache control that allows caching with no transform. -
TE_TRAILERS
TE header set totrailers
, used to enable trailer headers.
-
-
Method Details
-
createCached
Create and cache byte value. Use this method if the header value is stored in a constant, or used repeatedly.- Parameters:
name
- header namevalue
- value of the header- Returns:
- a new header
-
createCached
Create and cache byte value. Use this method if the header value is stored in a constant, or used repeatedly.- Parameters:
name
- header namevalue
- value of the header- Returns:
- a new header
-
createCached
Create and cache byte value. Use this method if the header value is stored in a constant, or used repeatedly.- Parameters:
name
- header namevalue
- value of the header- Returns:
- a new header
-
createCached
Create and cache byte value. Use this method if the header value is stored in a constant, or used repeatedly.- Parameters:
name
- header namevalue
- value of the header- Returns:
- a new header
-
createCached
Create and cache byte value. Use this method if the header value is stored in a constant, or used repeatedly.- Parameters:
name
- header namevalue
- value of the header- Returns:
- a new header
-
createCached
Create and cache byte value. Use this method if the header value is stored in a constant, or used repeatedly.- Parameters:
name
- header namevalue
- value of the header- Returns:
- a new header
-
create
Create a new header with a single value. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalue
- lazy string with the value- Returns:
- a new header
- See Also:
-
create
Create a new header with a single value. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalue
- integer value of the header- Returns:
- a new header
- See Also:
-
create
Create a new header with a single value. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalue
- long value of the header- Returns:
- a new header
- See Also:
-
create
Create a new header with a single value. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalue
- value of the header- Returns:
- a new header
- See Also:
-
create
Create a new header with a single value. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalue
- value of the header- Returns:
- a new header
- See Also:
-
create
Create a new header with a single value. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalue
- value of the header- Returns:
- a new header
- See Also:
-
create
Create a new header with a single value. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalue
- value of the header- Returns:
- a new header
- See Also:
-
create
Create a new header. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalues
- values of the header, must contain at least one value (which may be an empty String)- Returns:
- a new header
- Throws:
IllegalArgumentException
- in case the collection is empty- See Also:
-
create
Create a new header. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalues
- values of the header, must contain at least one value (which may be an empty String)- Returns:
- a new header
- Throws:
IllegalArgumentException
- in case the collection is empty- See Also:
-
create
Create a new header. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalues
- values of the header, must contain at least one value (which may be an empty String)- Returns:
- a new header
- Throws:
IllegalArgumentException
- in case the collection is empty- See Also:
-
create
Create a new header. This header is considered unchanging and not sensitive.- Parameters:
name
- name of the headervalues
- values of the header, must contain at least one value (which may be an empty String)- Returns:
- a new header
- Throws:
IllegalArgumentException
- in case the collection is empty- See Also:
-
createCached
public static Header createCached(HeaderName name, boolean changing, boolean sensitive, String value) Create and cache byte value. Use this method if the header value is stored in a constant, or used repeatedly.- Parameters:
name
- header namechanging
- whether the value is changing often (to disable caching for HTTP/2)sensitive
- whether the value is sensitive (to disable caching for HTTP/2)value
- value of the header- Returns:
- a new header
-
create
Create a new header.- Parameters:
name
- name of the headerchanging
- whether the value is changing often (to disable caching for HTTP/2)sensitive
- whether the value is sensitive (to disable caching for HTTP/2)values
- value(s) of the header- Returns:
- a new header
-
create
Create a new header.- Parameters:
name
- name of the headerchanging
- whether the value is changing often (to disable caching for HTTP/2)sensitive
- whether the value is sensitive (to disable caching for HTTP/2)value
- value of the header- Returns:
- a new header
-
create
Create a new header.- Parameters:
name
- name of the headerchanging
- whether the value is changing often (to disable caching for HTTP/2)sensitive
- whether the value is sensitive (to disable caching for HTTP/2)value
- value of the header- Returns:
- a new header
-