public class HttpResponseDefault extends Object implements HttpResponse
| Constructor and Description |
|---|
HttpResponseDefault(int status,
String contentType,
byte[] content,
Map<String,List<String>> headers,
Map<String,Cookie> cookies,
boolean wasZipped,
JsonManager jsonManager) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getContentAsByteArray()
Get the content as
byte[]. |
JsonObject |
getContentAsJsonObject()
Gets the content as a JsonObject.
|
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.
|
Cookie |
getCookie(String name)
Gets a cookie.
|
Map<String,Cookie> |
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.
|
protected JsonManager |
getJsonManager() |
int |
getStatus()
Gets the HTTP status.
|
boolean |
isGzipped()
Is the response gzipped?
|
String |
toString() |
protected JsonManager getJsonManager()
public int getStatus()
HttpResponsegetStatus in interface HttpResponsepublic String getContentType()
HttpResponsegetContentType in interface HttpResponsepublic String getContentAsString()
HttpResponseUTF-8 String.getContentAsString in interface HttpResponsepublic String getContentAsString(String encoding)
HttpResponsegetContentAsString in interface HttpResponsepublic JsonObject getContentAsJsonObject()
HttpResponsegetContentAsJsonObject in interface HttpResponsepublic byte[] getContentAsByteArray()
HttpResponsebyte[].getContentAsByteArray in interface HttpResponsepublic Map<String,List<String>> getHeaders()
HttpResponsegetHeaders in interface HttpResponsepublic String getHeaderFirst(String name)
HttpResponsegetHeaderFirst in interface HttpResponsepublic List<String> getHeader(String name)
HttpResponsegetHeader in interface HttpResponsepublic Map<String,Cookie> getCookies()
HttpResponsegetCookies in interface HttpResponsepublic Cookie getCookie(String name)
HttpResponsegetCookie in interface HttpResponsepublic boolean isGzipped()
HttpResponseisGzipped in interface HttpResponseCopyright © 2017. All rights reserved.