All header field names are compared in a case-insensitive manner.
| Modifier and Type | Method and Description |
|---|---|
| public HttpHeaders | Returns: this.the name of the header. name, CharSequence the value of the header. value)Adds a new header with the specified |
| public HttpHeaders | Returns: this.the name of the header. name, Iterable<? extends CharSequence> the values of the header. values)Adds new headers with the specified |
| public default HttpHeaders | Returns: this.the name of the header. name, Iterator<? extends CharSequence> the values of the header. valuesItr)Adds new headers with the specified |
| public HttpHeaders | Returns: this.the name of the header. name, CharSequence... the values of the header. values)Adds new headers with the specified |
| public HttpHeaders | Returns: this.the headers to add. headers)Adds all header names and values of |
| public HttpHeaders | |
| public default HttpHeaders | Returns: this.the name of the cookie. name, final CharSequence the value of the cookie. value)Adds a cookie with the specified |
| public HttpHeaders | |
| public default HttpHeaders | Returns: this.the name of the cookie. name, final CharSequence the value of the cookie. value)Adds a set-cookie with the specified |
| public HttpHeaders | |
| public default boolean | Returns: true if name exists.the header name. name)Returns |
| public default boolean | Returns: true if a name, value pair exists.the header name. name, CharSequence the header value of the header to find. value)Returns |
| public default boolean | Returns: true if found.the name of the header to find. name, CharSequence the value of the header to find. value)Returns |
| public HttpHeaders | Returns: A new headers instance, with the same contents as this one.Create an independent copy of these HTTP headers. |
| public static HttpHeaders | Returns: A new headers instance that use up as few resources as possible.Create a headers instance that is expected to remain empty. |
| public @Nullable CharSequence | Returns: the first header value if the header is found.null if there's no such header.the name of the header to retrieve. name)Returns the value of a header with the specified name. |
| public default CharSequence | Returns: the first header value ordefaultValue if there is no such header.the name of the header to retrieve. name, final CharSequence the default value. defaultValue)Returns the value of a header with the specified name. |
| public @Nullable CharSequence | Returns: the first header value ornull if there is no such header.the name of the header to retrieve. name)Returns the value of a header with the specified name and removes it from this object. |
| public default CharSequence | Returns: the first header value ordefaultValue if there is no such header.the name of the header to retrieve. name, final CharSequence the default value. defaultValue)Returns the value of a header with the specified name and removes it from this object. |
| public @Nullable HttpCookiePair | |
| public default Iterable | |
| public default Iterable | getCookies(CharSequence
the cookie-name of the name)HttpSetCookies to get.Gets the cookies with the same name. |
| public Iterator | |
| public Iterator | getCookiesIterator(CharSequence
the cookie-name of the name)HttpSetCookies to get.Gets the cookies with the same name. |
| public @Nullable HttpSetCookie | |
| public default Iterable | |
| public default Iterable | getSetCookies(CharSequence
the cookie-name of the name)HttpSetCookies to get.Gets the set-cookies with the same name. |
| public default Iterable | getSetCookies(CharSequence
the cookie-name of the name, CharSequence HttpSetCookies to get.the domain-value of the domain, CharSequence HttpSetCookies to get. This value may be matched according
to the Domain Matching algorithm.the path-av of the path)HttpSetCookies to get. This value may be matched according
to the Path Matching algorithm.Gets the set-cookies with the same name. |
| public Iterator | |
| public Iterator | getSetCookiesIterator(CharSequence
the cookie-name of the name)HttpSetCookies to get.Gets the set-cookies with the same name. |
| public Iterator | getSetCookiesIterator(CharSequence
the cookie-name of the name, CharSequence HttpSetCookies to get.the domain-value of the domain, CharSequence HttpSetCookies to get. This value may be matched according
to the Domain Matching algorithm.the path-av of the path)HttpSetCookies to get. This value may be matched according
to the Path Matching algorithm.Gets the set-cookies with the same name. |
| public default boolean | |
| public Iterator | |
| public Set | |
| public static HttpHeaders | Returns: A new empty headers instance.Create a headers instance with default size hint, and all validation checks turned on. |
| public static HttpHeaders | Returns: A new empty headers instance.true to validate header names, values, and cookies.Create a headers instance with default size hint, and all validation checks turned on. |
| public static HttpHeaders | Returns: A new empty headers instance with the given configuration.A hint as to how large the hash data structure should be.
The next positive power of two will be used. An upper bound may be enforced. sizeHint, boolean true to validate header names.true to validate cookie contents when parsing.true to validate header values.Create a headers instance with the given size hint, and the given validation checks turned on. |
| public boolean | Returns: true if at least one entry has been removed.the name of the header. name)Removes all headers with the specified |
| public boolean | Returns: true if at least one value has been removed.the name of the header. name, CharSequence the value of the header to remove. value)Removes specific value(s) from the specified header |
| public boolean | Returns: true if at least one entry has been removed.the cookie-name of the name)HttpSetCookies to remove.Removes all cookie identified by |
| public boolean | Returns: true if at least one value has been removed.the name of the header. name, CharSequence the value of the header to remove. value)Removes specific value(s) from the specified header |
| public boolean | Returns: true if at least one entry has been removed.the cookie-name of the name)HttpSetCookies to remove.Removes all set-cookie identified by |
| public boolean | Returns: true if at least one entry has been removed.the cookie-name of the name, CharSequence HttpSetCookies to remove.the domain-value of the domain, CharSequence HttpSetCookies to remove. This value may be matched according
to the Domain Matching algorithm.the path-av of the path)HttpSetCookies to remove. This value may be matched according
to the Path Matching algorithm.Removes all set-cookie identified by |
| public default HttpHeaders | Returns: this.the headers used to remove names and then add new entries. headers)Removes all header names contained in |
| public HttpHeaders | Returns: this.the name of the header. name, CharSequence the value of the header. value)Sets a header with the specified |
| public HttpHeaders | Returns: this.the name of the header. name, Iterable<? extends CharSequence> the values of the header. values)Sets a new header with the specified |
| public default HttpHeaders | Returns: this.the name of the header. name, Iterator<? extends CharSequence> the values of the header. valueItr)Sets a new header with the specified |
| public default HttpHeaders | Returns: this.the name of the header. name, CharSequence... the values of the header. values)Sets a header with the specified |
| public default HttpHeaders | Returns: this.the headers object which contains new values. headers)Clears the current header entries and copies all header entries of the specified |
| public int | |
| public default Spliterator | spliterator()
Overrides default java. Spliterator over the elements described by this
Iterable.
|
| public String | |
| public default String | Returns: string representation of thisHttpHeaders.a function that accepts the header name and value and returns the filtered value. filter)Builds a string which represents all the content in this |
| public default Iterable | values(CharSequence
the name of the header to retrieve. name)Returns all values for the header with the specified name. |
| public Iterator | valuesIterator(CharSequence
the name of the header to retrieve. name)Returns all values for the header with the specified name. |