Package io.servicetalk.http.api
Interface HttpHeadersFactory
- All Known Implementing Classes:
DefaultHttpHeadersFactory
,H2HeadersFactory
public interface HttpHeadersFactory
Factory method for creating
HttpHeaders
.-
Method Summary
Modifier and TypeMethodDescriptiondefault HttpHeaders
Create anHttpHeaders
instance designed to hold trailers, possibly optimized for being empty.Create anHttpHeaders
instance.Create anHttpHeaders
instance designed to hold trailers.boolean
Determine if cookies should be validated during parsing intoHttpSetCookie
s.default boolean
Determine if header names should be validated during parsing intoHttpHeaders
s.boolean
Determine if header values should be validated during parsing intoHttpHeaders
s.
-
Method Details
-
newHeaders
HttpHeaders newHeaders()Create anHttpHeaders
instance.- Returns:
- an
HttpHeaders
instance.
-
newTrailers
HttpHeaders newTrailers()Create anHttpHeaders
instance designed to hold trailers.- Returns:
- an
HttpHeaders
instance.
-
newEmptyTrailers
Create anHttpHeaders
instance designed to hold trailers, possibly optimized for being empty.Note: this should not return an immutable instance unless it is known that no code will need to mutate the trailers.
- Returns:
- an
HttpHeaders
instance.
-
validateNames
default boolean validateNames()Determine if header names should be validated during parsing intoHttpHeaders
s.- Returns:
true
if header names should be validated during parsing intoHttpHeaders
s.
-
validateCookies
boolean validateCookies()Determine if cookies should be validated during parsing intoHttpSetCookie
s.- Returns:
true
if a cookies should be validated during parsing intoHttpSetCookie
s.
-
validateValues
boolean validateValues()Determine if header values should be validated during parsing intoHttpHeaders
s.- Returns:
true
if header values should be validated during parsing intoHttpHeaders
s.
-