public final class HttpResponse
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContentCharset()
Get the charset for this response, or
null if unknown. |
java.lang.String |
getContentType()
Get the content type for this response, or
null if unknown. |
java.util.Map<java.lang.String,java.lang.String> |
getCookies()
Get the response cookies.
|
java.lang.String |
getFirstHeaderValue(java.lang.String name)
Get the first header value, or
null if unset. |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getHeaders()
Get the response headers.
|
java.io.InputStream |
getPayload()
Get the response payload
|
java.lang.String |
getResponseBody() |
int |
getStatusCode()
Get the response status code.
|
void |
read(java.lang.StringBuffer buffer) |
public java.lang.String getContentType()
null if unknown.public java.lang.String getContentCharset()
null if unknown.public java.io.InputStream getPayload()
public java.lang.String getResponseBody()
throws java.io.IOException
java.io.IOExceptionpublic void read(java.lang.StringBuffer buffer)
throws java.io.IOException
java.io.IOExceptionpublic int getStatusCode()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
public java.lang.String getFirstHeaderValue(java.lang.String name)
null if unset.name - public java.util.Map<java.lang.String,java.lang.String> getCookies()