Child pages
  • Response

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{div:style=display: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=des}{td}{div:class=sIndent}Get the charset of the response body.{div}{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}
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=des}{td}{div:class=sIndent}Get the content of response as binary data. It also supports gzip\-ed content.{div}{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}
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=des}{td}{div:class=sIndent}Get the content of the response as String.{div}{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}
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=des}{td}{div:class=sIndent}Gets the headers of the response as name/value arrays.{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}
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=des}{td}{div:class=sIndent}Gets the headers of the response as name/value arrays.{div}{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}
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=des}{td}{div:class=sIndent}Gets the status code of the response, the list of the possible values is in HTTP\_STATUS constants.{div}{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}
var status = response.getStatusCode();// compare with HTTP_STATUS constants
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}