Class HttpHeader$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HttpHeader$
Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends HttpHeader>
akka.util.OptionVal<T>fastFind
(Class<T> clazz, scala.collection.immutable.Seq<HttpHeader> headers) INTERNAL APIparse
(String name, String value, HeaderParser.Settings settings) Attempts to parse the given header name and value string into a header model instance.unapply
(HttpHeader header) Extract name and value from a header.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
HttpHeader$
public HttpHeader$()
-
-
Method Details
-
unapply
Extract name and value from a header. CAUTION: The name must be matched in *all-lowercase*!.- Parameters:
header
- (undocumented)- Returns:
- (undocumented)
-
parse
Attempts to parse the given header name and value string into a header model instance.This process has several possible outcomes:
1. The header name corresponds to a properly modelled header and a) the value is valid for this header type. In this case the method returns a
ParsingResult.Ok
with the respective header instance and no errors. b) the value consists of a number elements, some of which valid and some invalid, and the header type supports partial value parsing. In this case the method returns aParsingResult.Ok
with the respective header instance holding the valid value elements and anErrorInfo
for each invalid value. c) the value has invalid elements and the header type doesn't support partial value parsing. In this case the method returns aParsingResult.Ok
with aRawHeader
instance and a singleErrorInfo
for the value parsing problem.2. The header name does not correspond to a properly modelled header but the header name and the value are both syntactically legal according to the basic header requirements from the HTTP specification. (http://tools.ietf.org/html/rfc7230#section-3.2) In this case the method returns a
ParsingResult.Ok
with aRawHeader
instance and no errors.3. The header name or value are illegal according to the basic requirements for HTTP headers (http://tools.ietf.org/html/rfc7230#section-3.2). In this case the method returns a
ParsingResult.Error
.- Parameters:
name
- (undocumented)value
- (undocumented)settings
- (undocumented)- Returns:
- (undocumented)
-
fastFind
public <T extends HttpHeader> akka.util.OptionVal<T> fastFind(Class<T> clazz, scala.collection.immutable.Seq<HttpHeader> headers) INTERNAL API
-