- All Superinterfaces:
InboundHeaders
- All Known Subinterfaces:
OutboundResponseHeaders
Represents immutable inbound HTTP response headers.
This extends the InboundHeaders
to expose response specific information like response status, content type, content length and set-cookies.
An inbound response is received by a client in a client exchange.
- Since:
- 1.6
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptioncookies()
Returns the set-cookies defined in the response.Returns the content length of the request.Returns the content type header field value of the request.Decodes and returns the content type header of the request.Returns the response HTTP status.int
Returns the response HTTP status code.Methods inherited from interface io.inverno.mod.http.base.InboundHeaders
contains, contains, get, getAll, getAll, getAllHeader, getAllHeader, getAllParameter, getAllParameter, getHeader, getNames, getParameter
-
Method Details
-
getStatus
Returns the response HTTP status.
- Returns:
- the response status
- Throws:
IllegalArgumentException
- if the status code specified in the headers is not a known HTTP status
-
getStatusCode
int getStatusCode()Returns the response HTTP status code.
- Returns:
- the response status code
-
getContentType
String getContentType()Returns the content type header field value of the request.
- Returns:
- the content type or null
-
getContentTypeHeader
Headers.ContentType getContentTypeHeader()Decodes and returns the content type header of the request.
- Returns:
- the decoded content type header
-
getContentLength
Long getContentLength()Returns the content length of the request.
- Returns:
- the content length or null
-
cookies
InboundSetCookies cookies()Returns the set-cookies defined in the response.
- Returns:
- the set-cookies
-