Child pages
  • Response

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
{div:style=}
Wiki Markup
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.\\ \\ Enter additional information related to this 'class' inside the \{div} macro with 'id=description'{div} {div:id=description}{div}\\ {table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#getCharset]\() Get the charset of the response body.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#getMediaData]\() Get the content of response as binary data.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getResponseBody]\() Get the content of the response as String.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getResponseHeaders]\() Gets the headers of the response as name/value arrays.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getResponseHeaders]\(headerName) Gets the headers of the response as name/value arrays.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getStatusCode]\() Gets the status code of the response, the list of the possible values is in HTTP\_STATUS constants.{td}{tr}{tbody}{table}\\ {table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getCharset}{tr:id=name}{td}h6.getCharset{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getCharset{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}

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();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMediaData}{tr:id=name}{td}h6.getMediaData{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}getMediaData{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getResponseBody}{tr:id=name}{td}h6.getResponseBody{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getResponseBody{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getResponseHeaders}{tr:id=name}{td}h6.getResponseHeaders{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}getResponseHeaders{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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]);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getResponseHeaders-String}{tr:id=name}{td}h6.getResponseHeaders{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}getResponseHeaders{span}{span}\(headerName){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} headerName {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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");
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getStatusCode}{tr:id=name}{td}h6.getStatusCode{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}getStatusCode{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
Table Row (tr)
classlastDetailRow
Table Cell (td)