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. |
Object | getResponseHeaders() Gets the headers of the response as name/value arrays. |
Object | 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 |
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 |
Samplevar pageData = response.getResponseBody(); |
getResponseHeaders |
Object getResponseHeaders () |
Gets the headers of the response as name/value arrays.
|
Returns |
Samplevar allHeaders = response.getResponseHeaders(); var header; for (header in allHeaders) application.output(header + ': ' + allHeaders[header]); |
getResponseHeaders |
Object getResponseHeaders (headerName) |
Gets the headers of the response as name/value arrays.
|
Parameters {String} headerName
|
Returns |
Samplevar contentLength = response.getResponseHeaders("Content-Length"); |
getStatusCode |
Number getStatusCode () |
Gets the status code of the response, the list of the possible values is in HTTP_STATUS constants.
|
Returns |
Samplevar status = response.getStatusCode();// compare with HTTP_STATUS constants |
Overview
Content Tools
Activity