public class HttpResponse extends HttpBase<HttpResponse>
| Modifier and Type | Field and Description |
|---|---|
protected int |
statusCode |
protected java.lang.String |
statusPhrase |
body, charset, form, formEncoding, HEADER_ACCEPT_ENCODING, HEADER_CONTENT_ENCODING, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_ETAG, HEADER_HOST, headers, httpVersion, mediaType| Constructor and Description |
|---|
HttpResponse() |
| Modifier and Type | Method and Description |
|---|---|
static HttpResponse |
readFrom(java.io.InputStream in)
Reads response input stream and returns
response. |
int |
statusCode()
Returns response status code.
|
HttpResponse |
statusCode(int statusCode)
Sets response status code.
|
java.lang.String |
statusPhrase()
Returns response status phrase.
|
HttpResponse |
statusPhrase(java.lang.String statusPhrase)
Sets response status phrase.
|
java.lang.String |
toString()
String representation of the HTTP response.
|
HttpResponse |
unzip()
Unzips GZip-ed body content, removes the content-encoding header
and sets the new content-length value.
|
_header, acceptEncoding, acceptEncoding, body, body, body, bodyBytes, bodyText, bodyText, bodyText, bodyText, charset, charset, contentEncoding, contentLength, contentLength, contentType, contentType, contentType, form, form, form, formEncoding, formString, header, header, header, header, httpVersion, httpVersion, initForm, isFormMultipart, mediaType, mediaType, readBody, readHeaders, removeHeader, sendTo, toByteArrayprotected int statusCode
protected java.lang.String statusPhrase
public int statusCode()
public HttpResponse statusCode(int statusCode)
public java.lang.String statusPhrase()
public HttpResponse statusPhrase(java.lang.String statusPhrase)
public HttpResponse unzip()
public java.lang.String toString()
toString in class java.lang.Objectpublic static HttpResponse readFrom(java.io.InputStream in)
response.
Supports both streamed and chunked response.Copyright © 2003-2013 Jodd Team