java.lang.Object
io.helidon.http.HeaderValues
Values of commonly used headers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HeaderAccept text/event-stream.static final HeaderAccept application/json.static final HeaderAccept byte ranges for file download.static final HeaderNot accepting byte ranges for file download.static final HeaderAccept text/plain with UTF-8.static final HeaderCache control without any caching.static final HeaderCache control that allows caching with no transform.static final HeaderConnection close.static final HeaderConnection keep-alive.static final HeaderContent length with 0 value.static final HeaderContent type SSE event stream.static final HeaderContent type application/json with no charset.static final HeaderContent type octet stream.static final HeaderContent type text plain with no charset.static final HeaderExpect 100 header.static final HeaderTE header set totrailers, used to enable trailer headers.static final HeaderChunked transfer encoding. -
Method Summary
Modifier and TypeMethodDescriptionstatic Headercreate(HeaderName name, boolean changing, boolean sensitive, int value) Create a new header.static Headercreate(HeaderName name, boolean changing, boolean sensitive, long value) Create a new header.static Headercreate(HeaderName name, boolean changing, boolean sensitive, String... values) Create a new header.static Headercreate(HeaderName name, int value) Create a new header with a single value.static Headercreate(HeaderName name, long value) Create a new header with a single value.static Headercreate(HeaderName name, LazyString value) Create a new header with a single value.static Headercreate(HeaderName name, String value) Create a new header with a single value.static Headercreate(HeaderName name, String... values) Create a new header.static Headercreate(HeaderName name, Collection<String> values) Create a new header.static HeaderCreate a new header with a single value.static HeaderCreate a new header with a single value.static HeaderCreate a new header with a single value.static HeaderCreate a new header.static Headercreate(String name, Collection<String> values) Create a new header.static HeadercreateCached(HeaderName name, boolean changing, boolean sensitive, String value) Create and cache byte value.static HeadercreateCached(HeaderName name, int value) Create and cache byte value.static HeadercreateCached(HeaderName name, long value) Create and cache byte value.static HeadercreateCached(HeaderName name, String value) Create and cache byte value.static HeadercreateCached(String name, int value) Create and cache byte value.static HeadercreateCached(String name, long value) Create and cache byte value.static HeadercreateCached(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- 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- 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- 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- Returns:
- a new header
- 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
-