public abstract class ResponseBase extends Object implements Response
Response.ResponseBuilder
Modifier and Type | Field and Description |
---|---|
protected List<HttpResponseBodyPart> |
bodyParts |
protected HttpResponseHeaders |
headers |
protected HttpResponseStatus |
status |
Modifier | Constructor and Description |
---|---|
protected |
ResponseBase(HttpResponseStatus status,
HttpResponseHeaders headers,
List<HttpResponseBodyPart> bodyParts) |
Modifier and Type | Method and Description |
---|---|
protected abstract List<Cookie> |
buildCookies() |
protected Charset |
calculateCharset(String charset) |
String |
getContentType()
Return the content-type header value.
|
List<Cookie> |
getCookies()
Return the list of
Cookie . |
String |
getHeader(String name)
Return the response header
|
FluentCaseInsensitiveStringsMap |
getHeaders() |
List<String> |
getHeaders(String name)
Return a
List of the response header value. |
int |
getStatusCode()
Returns the status code for the request.
|
String |
getStatusText()
Returns the status text for the request.
|
Uri |
getUri()
Return the request
Uri . |
boolean |
hasResponseBody()
Return true if the response's body has been computed by an
AsyncHandler . |
boolean |
hasResponseHeaders()
Return true if the response's headers has been computed by an
AsyncHandler It will return false if the either
AsyncHandler.onStatusReceived(HttpResponseStatus) or AsyncHandler.onHeadersReceived(HttpResponseHeaders) returned AsyncHandler.STATE.ABORT |
boolean |
hasResponseStatus()
Return true if the response's status has been computed by an
AsyncHandler |
boolean |
isRedirected()
Return true if the response redirects to another object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResponseBody, getResponseBody, getResponseBodyAsByteBuffer, getResponseBodyAsBytes, getResponseBodyAsStream, getResponseBodyExcerpt, getResponseBodyExcerpt, toString
protected final HttpResponseStatus status
protected final HttpResponseHeaders headers
protected final List<HttpResponseBodyPart> bodyParts
protected ResponseBase(HttpResponseStatus status, HttpResponseHeaders headers, List<HttpResponseBodyPart> bodyParts)
public final int getStatusCode()
Response
getStatusCode
in interface Response
public final String getStatusText()
Response
getStatusText
in interface Response
public final String getContentType()
Response
getContentType
in interface Response
public final String getHeader(String name)
Response
public final List<String> getHeaders(String name)
Response
List
of the response header value.getHeaders
in interface Response
public final FluentCaseInsensitiveStringsMap getHeaders()
getHeaders
in interface Response
public final boolean isRedirected()
Response
isRedirected
in interface Response
public List<Cookie> getCookies()
Response
Cookie
.getCookies
in interface Response
public boolean hasResponseStatus()
Response
AsyncHandler
hasResponseStatus
in interface Response
AsyncHandler
public boolean hasResponseHeaders()
Response
AsyncHandler
It will return false if the either
AsyncHandler.onStatusReceived(HttpResponseStatus)
or AsyncHandler.onHeadersReceived(HttpResponseHeaders)
returned AsyncHandler.STATE.ABORT
hasResponseHeaders
in interface Response
AsyncHandler
public boolean hasResponseBody()
Response
AsyncHandler
. It will return false if the either AsyncHandler.onStatusReceived(HttpResponseStatus)
or AsyncHandler.onHeadersReceived(HttpResponseHeaders)
returned AsyncHandler.STATE.ABORT
hasResponseBody
in interface Response
AsyncHandler
Copyright © 2016. All Rights Reserved.