Method Summary | |
---|---|
String | #getCharset() Get the charset of the response body. |
byte[] | #getMediaData() Get the content of response as binary data. |
String | #getResponseBody() Get the content of the response as String. |
#getResponseHeaders([headerName]) Gets the headers of the response as name/value arrays. |
|
Number | #getStatusCode() Gets the status code of the response, the list of the possible values is in HTTP_STATUS constants. |
Method Details |
---|
getCharset |
String getCharset () |
Get the charset of the response body. |
Returns String |
Samplevar charset = response.getCharset(); |
getMediaData |
byte[] getMediaData () |
Get the content of response as binary data. It also supports gzip-ed content. |
Returns byte[] |
Samplevar mediaData = response.getMediaData(); |
getResponseBody |
String getResponseBody () |
Get the content of the response as String. |
Returns String |
Samplevar pageData = response.getResponseBody(); |
getResponseHeaders |
getResponseHeaders ([headerName]) |
Gets the headers of the response as name/value arrays. |
Parameters [headerName] |
Samplevar allHeaders = response.getResponseHeaders(null); |
getStatusCode |
Number getStatusCode () |
Gets the status code of the response, the list of the possible values is in HTTP_STATUS constants. |
Returns Number |
Samplevar status = response.getStatusCode();// compare with HTTP_STATUS constants |