Child pages
  • Response

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Div
styledisplay:none

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

Div
iddescription



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getCharset()
Get the charset of the response body.
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
getMediaData()
Get the content of response as binary data.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getResponseBody()
Get the content of the response as String.
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
getResponseHeaders()
Gets the headers of the response as name/value arrays.
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
getResponseHeaders(headerName)
Gets the headers of the response as name/value arrays.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
getStatusCode()
Gets the status code of the response, the list of the possible values is in HTTP_STATUS constants.



HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idgetCharset
Table Row (tr)
idname
Table Cell (td)

getCharset

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getCharset
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the charset of the response body.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var charset = response.getCharset();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetMediaData
Table Row (tr)
idname
Table Cell (td)

getMediaData

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
byte[]
Span
stylefont-weight: bold;
getMediaData
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the content of response as binary data. It also supports gzip-ed content.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
byte[]
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var mediaData = response.getMediaData();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetResponseBody
Table Row (tr)
idname
Table Cell (td)

getResponseBody

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getResponseBody
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the content of the response as String.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var pageData = response.getResponseBody();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetResponseHeaders
Table Row (tr)
idname
Table Cell (td)

getResponseHeaders

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
getResponseHeaders
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets the headers of the response as name/value arrays.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var allHeaders = response.getResponseHeaders();
var header;

for (header in allHeaders) application.output(header + ': ' + allHeaders[header]);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetResponseHeaders-String
Table Row (tr)
idname
Table Cell (td)

getResponseHeaders

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
getResponseHeaders
Span
(headerName)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets the headers of the response as name/value arrays.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} headerName
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var contentLength = response.getResponseHeaders("Content-Length");
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetStatusCode
Table Row (tr)
idname
Table Cell (td)

getStatusCode

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getStatusCode
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets the status code of the response, the list of the possible values is in HTTP_STATUS constants.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var status = response.getStatusCode();// compare with HTTP_STATUS constants
Table Row (tr)
classlastDetailRow
Table Cell (td)