Class HttpHeader
java.lang.Object
org.apache.pekko.http.javadsl.model.HttpHeader
- Direct Known Subclasses:
HttpHeader
The base type representing Http headers. All actual header values will be instances of one of the
subtypes defined in the `headers` packages. Unknown headers will be subtypes of
RawHeader. Not for user extension.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanReturns true if and only if nameInLowerCase.equals(lowercaseName()).abstract booleanReturns !abstract StringReturns the lower-cased name of the header.abstract Stringname()Returns the name of the header.static HttpHeaderAttempts to parse the given header name and value string into a header model instance.abstract booleanReturns true if and only if the header is to be rendered in requests.abstract booleanReturns true if and only if the header is to be rendered in responses.abstract Stringvalue()Returns the String representation of the value of the header.
-
Constructor Details
-
HttpHeader
public HttpHeader()
-
-
Method Details
-
name
Returns the name of the header. -
value
Returns the String representation of the value of the header. -
lowercaseName
Returns the lower-cased name of the header. -
is
Returns true if and only if nameInLowerCase.equals(lowercaseName()). -
isNot
Returns !is(nameInLowerCase). -
renderInRequests
public abstract boolean renderInRequests()Returns true if and only if the header is to be rendered in requests. -
renderInResponses
public abstract boolean renderInResponses()Returns true if and only if the header is to be rendered in responses. -
parse
Attempts to parse the given header name and value string into a header model instance.- Throws:
IllegalArgumentException- if parsing is unsuccessful.
-