public class HTTPResponse
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BAD_REQUEST |
static int |
FORBIDDEN |
static int |
NOT_FOUND |
static int |
OK |
static int |
UNAUTHORIZED |
Constructor and Description |
---|
HTTPResponse() |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(java.lang.String aKey,
java.lang.String aValue)
Adds a header for key.
|
byte[] |
getBytes()
Returns the bytes.
|
int |
getCode()
Returns the response return code.
|
java.lang.String |
getContentType()
Returns the content type.
|
java.util.List<java.lang.String> |
getCookies()
Returns the cookies.
|
java.lang.String |
getCookieString()
Returns the cookie string.
|
java.util.List<HTTPRequest.Header> |
getHeaders()
Returns the headers.
|
java.lang.String |
getHeaderString()
Returns the headers as a string.
|
java.lang.String |
getMessage()
Returns the response return message.
|
long |
getResponseTime()
Returns the response time in milliseconds.
|
java.lang.String |
getSummary()
Returns a response summary string.
|
java.lang.String |
getText()
Returns the response byte string.
|
java.lang.String |
toString()
Returns a string representation.
|
public static final int OK
public static final int BAD_REQUEST
public static final int UNAUTHORIZED
public static final int FORBIDDEN
public static final int NOT_FOUND
public int getCode()
public java.lang.String getMessage()
public java.util.List<HTTPRequest.Header> getHeaders()
public void addHeader(java.lang.String aKey, java.lang.String aValue)
public java.lang.String getHeaderString()
public java.util.List<java.lang.String> getCookies()
public java.lang.String getCookieString()
public java.lang.String getContentType()
public byte[] getBytes()
public java.lang.String getText()
public long getResponseTime()
public java.lang.String getSummary()
public java.lang.String toString()
toString
in class java.lang.Object