Child pages
  • Response
Skip to end of metadata
Go to start of metadata


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
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
String
Sample
var pageData = response.getResponseBody();
getResponseHeaders

getResponseHeaders ([headerName])

Gets the headers of the response as name/value arrays.
Parameters
[headerName]
Sample
var 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
Sample
var status = response.getStatusCode();// compare with HTTP_STATUS constants
  • No labels