Package org.eclipse.jetty.client
Class HttpResponse
java.lang.Object
org.eclipse.jetty.client.HttpResponse
- All Implemented Interfaces:
Response
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.client.api.Response
Response.AsyncContentListener, Response.BeginListener, Response.CompleteListener, Response.ContentListener, Response.DemandedContentListener, Response.FailureListener, Response.HeaderListener, Response.HeadersListener, Response.Listener, Response.ResponseListener, Response.SuccessListener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Attempts to abort the receive of this response.void
Returns the headers of this response.<T extends Response.ResponseListener>
List<T>getListeners
(Class<T> type) 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
-
getListeners
- Specified by:
getListeners
in interfaceResponse
- Type Parameters:
T
- the type of class- Parameters:
type
- the listener class- Returns:
- the response listener passed to
Request.send(org.eclipse.jetty.client.api.Response.CompleteListener)
-
getTrailers
-
trailer
-
abort
Description copied from interface:Response
Attempts to abort the receive of this response. -
toString
-