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 |
|
Sample var charset = response.getCharset(); |
|
getMediaData |
|
byte[] getMediaData () | |
Get the content of response as binary data. It also supports gzip-ed content.
|
|
Returns byte[]
|
|
Sample var mediaData = response.getMediaData(); |
|
getResponseBody |
|
String getResponseBody () | |
Get the content of the response as String.
|
|
Returns |
|
Sample var pageData = response.getResponseBody(); |
|
getResponseHeaders |
|
Object getResponseHeaders () | |
Gets the headers of the response as name/value arrays.
|
|
Returns |
|
Sample var 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 |
|
Sample var 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 |
|
Sample var status = response.getStatusCode();// compare with HTTP_STATUS constants |
|
Overview
Content Tools
Activity