Top Fields Constructors Methods
org.eclipse.jetty.client.transport

public Class HttpResponse

extends Object
implements Response
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.client.Response
Imports
java.util.concurrent.CompletableFuture, java.util.function.Consumer, org.eclipse.jetty.client.Request, .Response, org.eclipse.jetty.http.HttpField, .HttpFields, .HttpVersion

Field Summary

Modifier and TypeField and Description
private final HttpFields.Mutable
private String
private final Request
private int
private HttpFields.Mutable
private HttpVersion

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public CompletableFuture<Boolean>
abort(Throwable
the abort cause, must not be null
cause
)

Implements org.eclipse.jetty.client.Response.abort.

Attempts to abort the receive of this response.
public HttpResponse
public void
public HttpFields
getHeaders()

Implements org.eclipse.jetty.client.Response.getHeaders.

Returns the headers of this response.

public String
public Request
public int
public HttpFields
public HttpVersion
public HttpResponse
public HttpResponse
reason(String reason)

public HttpResponse
status(int status)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public HttpResponse
trailer(HttpField trailer)

public HttpResponse
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

headersback to summary
private final HttpFields.Mutable headers
reasonback to summary
private String reason
requestback to summary
private final Request request
statusback to summary
private int status
trailersback to summary
private HttpFields.Mutable trailers
versionback to summary
private HttpVersion version

Constructor Detail

HttpResponseback to summary
public HttpResponse(Request request)

Method Detail

abortback to summary
public CompletableFuture<Boolean> abort(Throwable cause)

Implements org.eclipse.jetty.client.Response.abort.

Doc from org.eclipse.jetty.client.Response.abort.

Attempts to abort the receive of this response.

Parameters
cause:Throwable

the abort cause, must not be null

Returns:CompletableFuture<Boolean>

whether the abort succeeded

Annotations
@Override
addHeaderback to summary
public HttpResponse addHeader(HttpField header)
clearHeadersback to summary
public void clearHeaders()
getHeadersback to summary
public HttpFields getHeaders()

Implements org.eclipse.jetty.client.Response.getHeaders.

Doc from org.eclipse.jetty.client.Response.getHeaders.

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: the Content-Length header will be removed.

Similarly, the Content-Encoding header may be removed or modified, as the content is decoded by the client.

Returns:HttpFields

the headers of this response

Annotations
@Override
getReasonback to summary
public String getReason()

Implements org.eclipse.jetty.client.Response.getReason.

Returns:String

Doc from org.eclipse.jetty.client.Response.getReason.

the HTTP reason associated to the getStatus

Annotations
@Override
getRequestback to summary
public Request getRequest()

Implements org.eclipse.jetty.client.Response.getRequest.

Returns:Request

Doc from org.eclipse.jetty.client.Response.getRequest.

the request associated with this response

Annotations
@Override
getStatusback to summary
public int getStatus()

Implements org.eclipse.jetty.client.Response.getStatus.

Returns:int

Doc from org.eclipse.jetty.client.Response.getStatus.

the HTTP status code of this response, such as 200 or 404

Annotations
@Override
getTrailersback to summary
public HttpFields getTrailers()

Implements org.eclipse.jetty.client.Response.getTrailers.

Returns:HttpFields

Doc from org.eclipse.jetty.client.Response.getTrailers.

the trailers of this response

Annotations
@Override
getVersionback to summary
public HttpVersion getVersion()

Implements org.eclipse.jetty.client.Response.getVersion.

Returns:HttpVersion

Doc from org.eclipse.jetty.client.Response.getVersion.

the HTTP version of this response, such as "HTTP/1.1"

Annotations
@Override
headersback to summary
public HttpResponse headers(Consumer<HttpFields.Mutable> consumer)
reasonback to summary
public HttpResponse reason(String reason)
statusback to summary
public HttpResponse status(int status)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
trailerback to summary
public HttpResponse trailer(HttpField trailer)
versionback to summary
public HttpResponse version(HttpVersion version)