public class NettyResponse extends ResponseBase
Response
API.Response.ResponseBuilder
bodyParts, headers, status
Constructor and Description |
---|
NettyResponse(HttpResponseStatus status,
HttpResponseHeaders headers,
List<HttpResponseBodyPart> bodyParts) |
Modifier and Type | Method and Description |
---|---|
protected List<Cookie> |
buildCookies() |
String |
getResponseBody()
Return the entire response body as a String.
|
String |
getResponseBody(Charset charset)
Return the entire response body as a String.
|
ByteBuffer |
getResponseBodyAsByteBuffer()
Return the entire response body as a ByteBuffer.
|
byte[] |
getResponseBodyAsBytes()
Return the entire response body as a byte[].
|
InputStream |
getResponseBodyAsStream()
Returns an input stream for the response body.
|
calculateCharset, getContentType, getCookies, getHeader, getHeaders, getHeaders, getLocalAddress, getRemoteAddress, getStatusCode, getStatusText, getUri, hasResponseBody, hasResponseHeaders, hasResponseStatus, isRedirected, toString
public NettyResponse(HttpResponseStatus status, HttpResponseHeaders headers, List<HttpResponseBodyPart> bodyParts)
protected List<Cookie> buildCookies()
buildCookies
in class ResponseBase
public byte[] getResponseBodyAsBytes()
Response
public ByteBuffer getResponseBodyAsByteBuffer()
Response
public String getResponseBody()
Response
public String getResponseBody(Charset charset)
Response
charset
- the charset to use when decoding the streampublic InputStream getResponseBodyAsStream()
Response
Copyright © 2015. All Rights Reserved.