public class SpincastHttpResponse extends Object implements IHttpResponse
| Constructor and Description |
|---|
SpincastHttpResponse(int status,
String contentType,
byte[] content,
Map<String,List<String>> headers,
Map<String,ICookie> cookies,
boolean wasZipped) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getContentAsByteArray()
Get the content as
byte[]. |
String |
getContentAsString()
Gets the content as a
UTF-8 String. |
String |
getContentAsString(String encoding)
Gets the content as a String using the specified
encoding.
|
String |
getContentType()
Gets the Content-Type.
|
ICookie |
getCookie(String name)
Gets a cookie.
|
Map<String,ICookie> |
getCookies()
Gets the cookies.
|
List<String> |
getHeader(String name)
Gets an header.
|
String |
getHeaderFirst(String name)
Gets the first value of an header.
|
Map<String,List<String>> |
getHeaders()
Gets the headers.
|
int |
getStatus()
Gets the HTTP status.
|
boolean |
isGzipped()
Is the response gzipped?
|
public int getStatus()
IHttpResponsegetStatus in interface IHttpResponsepublic String getContentType()
IHttpResponsegetContentType in interface IHttpResponsepublic String getContentAsString()
IHttpResponseUTF-8 String.getContentAsString in interface IHttpResponsepublic String getContentAsString(String encoding)
IHttpResponsegetContentAsString in interface IHttpResponsepublic byte[] getContentAsByteArray()
IHttpResponsebyte[].getContentAsByteArray in interface IHttpResponsepublic Map<String,List<String>> getHeaders()
IHttpResponsegetHeaders in interface IHttpResponsepublic String getHeaderFirst(String name)
IHttpResponsegetHeaderFirst in interface IHttpResponsepublic List<String> getHeader(String name)
IHttpResponsegetHeader in interface IHttpResponsepublic Map<String,ICookie> getCookies()
IHttpResponsegetCookies in interface IHttpResponsepublic ICookie getCookie(String name)
IHttpResponsegetCookie in interface IHttpResponsepublic boolean isGzipped()
IHttpResponseisGzipped in interface IHttpResponseCopyright © 2016. All rights reserved.