Class HttpResponse
java.lang.Object
org.eclipse.jetty.client.transport.HttpResponse
- All Implemented Interfaces:
Response
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.client.Response
Response.AsyncContentListener, Response.BeginListener, Response.CompleteListener, Response.ContentListener, Response.ContentSourceListener, Response.FailureListener, Response.HeaderListener, Response.HeadersListener, Response.Listener, Response.ResponseListener, Response.SuccessListener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAttempts to abort the receive of this response.void
Returns the headers of this response.int
headers
(Consumer<HttpFields.Mutable> consumer) status
(int status) toString()
version
(HttpVersion version)
-
Constructor Details
-
HttpResponse
-
-
Method Details
-
getRequest
- Specified by:
getRequest
in interfaceResponse
- Returns:
- the request associated with this response
-
getVersion
- Specified by:
getVersion
in interfaceResponse
- Returns:
- the HTTP version of this response, such as "HTTP/1.1"
-
version
-
getStatus
public int getStatus() -
status
-
getReason
- Specified by:
getReason
in interfaceResponse
- Returns:
- the HTTP reason associated to the
Response.getStatus()
-
reason
-
getHeaders
Description copied from interface:Response
Returns the headers of this response.
Some headers sent by the server may not be present, or be present but modified, while the content is being processed. A typical example is the
Content-Length
header when the content is sent compressed by the server and automatically decompressed by the client: theContent-Length
header will be removed.Similarly, the
Content-Encoding
header may be removed or modified, as the content is decoded by the client.- Specified by:
getHeaders
in interfaceResponse
- Returns:
- the headers of this response
-
clearHeaders
public void clearHeaders() -
addHeader
-
headers
-
getTrailers
- Specified by:
getTrailers
in interfaceResponse
- Returns:
- the trailers of this response
-
trailer
-
abort
Description copied from interface:Response
Attempts to abort the receive of this response. -
toString
-