{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\
{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}[Boolean]{td}{td}[#addHeader]\(headerName, value)
Cache
index
true
refresh
100d
showRefresh
true
id
doc
title
Refresh page
showDate
true
retry
Enable
servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientservoy sSummary12%30%58%height: 30px;3Methods SummaryAdd a header to the request.voidExecute the request method asynchronous.voidExecute the request method asynchronous using windows authentication.voidExecute the request method asynchronous.voidExecute the request method asynchronous using windows authentication.voidExecute the request method asynchronous.voidExecute the request method asynchronous using windows authentication.Execute the request method.Execute the request method.Execute a request method using windows authentication.voidWhatever to use preemptive authentication (sending the credentials in the header, avoiding the server request to the client - useful when uploading files, as some http servers would cancel the first request from the client, if too big, as the authentication request to the client was not yet sent)functionservoy sDetail2100%height:30px2Methods DetailsaddHeadername
{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#executeAsyncRequest]\(successCallbackMethod, errorCallbackMethod)
Execute the request method asynchronous.{td}{tr}{tbody}{tbody}{tr}{td}[Response]{td}{td}[#executeRequest]\()
Execute the request method.{td}{tr}{tbody}{tbody}{tr}{td}[Response]{td}{td}[#executeRequest]\(userName, password)
Execute the request method.{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=addHeader|class=node}{tr:id=name}{td}h6.addHeader{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}addHeader{span}{span:id=iets|style=float: left;}\(headerName, value){span}{td}{tr}{tr:id=des}{td}{sub-section:addHeader_des|trigger=button|text=}{sub-section}{sub-section:addHeader_des|trigger=none|class=sIndent}Add a header to the request.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addHeader_snc|trigger=button|text=}{sub-section}{sub-section:addHeader_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addHeader_prs|trigger=button|text=}{sub-section}{sub-section:addHeader_prs|trigger=none|class=sIndent}\{[String]} headerName
\{[String]} value
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addHeader_ret|trigger=button|text=}{sub-section}{sub-section:addHeader_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addHeader_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addHeader_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addHeader_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addHeader_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addHeader_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addHeader_sam|trigger=none}{code:language=javascript}
method.addHeader('Content-type','text/xml; charset=ISO-8859-1')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=executeAsyncRequest-String_String_Function_Function|class=node}{tr:id=name}{td}h6.executeAsyncRequest{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}executeAsyncRequest{span}{span:id=iets|style=float: left;}\(userName, password, successCallbackMethod, errorCallbackMethod){span}{td}{tr}{tr:id=des}{td}{sub-section:executeAsyncRequest-String_String_Function_Function_des|trigger=button|text=}{sub-section}{sub-section:executeAsyncRequest-String_String_Function_Function_des|trigger=none|class=sIndent}Execute the request method asynchronous. Success callback method will be called when response is received. Response is sent as parameter in callback. If no response is received
Success callback method will be called when response is received.
Response is sent as parameter in callback.
This Response can be a response with a different status code then just 200, it could also be 500, which is still a valid response from the server, this won't go into the error callback.
So you need to test the Reponse.getStatusCode() for that to know if everything did go OK.
If no response is received (request errors out), the errorCallbackMethod is called with exception message as parameter.
prs
Parameters
sIndentusernamethe user namepasswordthe passwordworkstationThe workstation the authentication request is originating from.domainThe domain to authenticate within.successCallbackMethodcallbackMethod to be called after response is receivederrorCallbackMethodcallbackMethod to be called if request errors outclients
Execute the request method asynchronous using windows authentication.
Success callback method will be called when response is received. Response is sent as parameter in callback followed by any 'callbackExtraArgs' that were given.
This Response can be a response with a different status code then just 200, it could also be 500, which is still a valid response from the server, this won't go into the error callback.
So you need to test the Reponse.getStatusCode() for that to know if everything did go OK.
If no response is received (request errors out, network errors), the errorCallbackMethod is called with exception message as parameter followed by any 'callbackExtraArgs' that were given.
prs
Parameters
sIndentusernamethe user namepasswordthe passwordworkstationThe workstation the authentication request is originating from.domainThe domain to authenticate within.successCallbackMethodcallbackMethod to be called after response is receivederrorCallbackMethodcallbackMethod to be called if request errors outcallbackExtraArgsextra arguments that will be passed to the callback methods; can be used to identify from which request the response arrived when using the same callback method for multiple requests. Please use only simple JSON arguments (primitive types or array/objects of primitive types)clients
Execute the request method asynchronous. Success callback method will be called when response is received.
Response is sent as parameter in callback.
This Response can be a response with a different status code then just 200, it could also be 500, which is still a valid response from the server, this won't go into the error callback.
So you need to test the Reponse.getStatusCode() for that to know if everything did go OK.
If no response is received (request errors out), the errorCallbackMethod is called with exception message as parameter.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:executeAsyncRequest-String_String_Function_Function_snc|trigger=button|text=}{sub-section}{sub-section:executeAsyncRequest-String_String_Function_Function_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:executeAsyncRequest-String_String_Function_Function_prs|trigger=button|text=}{sub-section}{sub-section:executeAsyncRequest-String_String_Function_Function_prs|trigger=none|class=sIndent}\{[String]} userName -- the user name
\{[String]} password -- the password
\{[Function]} successCallbackMethod -- callbackMethod to be called after response is received
\{[Function]} errorCallbackMethod -- callbackMethod to be called if request errors out
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:executeAsyncRequest-String_String_Function_Function_ret|trigger=button|text=}{sub-section}{sub-section:executeAsyncRequest-String_String_Function_Function_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:executeAsyncRequest-String_String_Function_Function_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeAsyncRequest-String_String_Function_Function_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:executeAsyncRequest-String_String_Function_Function_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeAsyncRequest-String_String_Function_Function_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:executeAsyncRequest-String_String_Function_Function_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeAsyncRequest-String_String_Function_Function_sam|trigger=none}{code:language=javascript}
var response = method.executeAsyncRequest(globals.successCallback,globals.errorCallback)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=executeAsyncRequest-Function_Function|class=node}{tr:id=name}{td}h6.executeAsyncRequest{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}executeAsyncRequest{span}{span:id=iets|style=float: left;}\(successCallbackMethod, errorCallbackMethod){span}{td}{tr}{tr:id=des}{td}{sub-section:executeAsyncRequest-Function_Function_des|trigger=button|text=}{sub-section}{sub-section:executeAsyncRequest-Function_Function_des|trigger=none|class=sIndent}Execute the request method asynchronous. Success callback method will be called when response is received. Response is sent as parameter in callback. If no response is received (request errors out), the errorCallbackMethod is called with exception message as parameter.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:executeAsyncRequest-Function_Function_snc|trigger=button|text=}{sub-section}{sub-section:executeAsyncRequest-Function_Function_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:executeAsyncRequest-Function_Function_prs|trigger=button|text=}{sub-section}{sub-section:executeAsyncRequest-Function_Function_prs|trigger=none|class=sIndent}\{[Function]} successCallbackMethod -- callbackMethod to be called after response is received
\{[Function]} errorCallbackMethod -- callbackMethod to be called if request errors out
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:executeAsyncRequest-Function_Function_ret|trigger=button|text=}{sub-section}{sub-section:executeAsyncRequest-Function_Function_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:executeAsyncRequest-Function_Function_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeAsyncRequest-Function_Function_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:executeAsyncRequest-Function_Function_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeAsyncRequest-Function_Function_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:executeAsyncRequest-Function_Function_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeAsyncRequest-Function_Function_sam|trigger=none}{code:language=javascript}
var response = method.executeAsyncRequest(globals.successCallback,globals.errorCallback)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=executeRequest|class=node}{tr:id=name}{td}h6.executeRequest{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Response]{span}{span:id=iets|style=float: left; font-weight: bold;}executeRequest{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:executeRequest_des|trigger=button|text=}{sub-section}{sub-section:executeRequest_des|trigger=none|class=sIndent}Execute the request method.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:executeRequest_snc|trigger=button|text=}{sub-section}{sub-section:executeRequest_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:executeRequest_prs|trigger=button|text=}{sub-section}{sub-section:executeRequest_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:executeRequest_ret|trigger=button|text=}{sub-section}{sub-section:executeRequest_ret|trigger=none|class=sIndent}[Response]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:executeRequest_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeRequest_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:executeRequest_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeRequest_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:executeRequest_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeRequest_sam|trigger=none}{code:language=javascript}
var response = method.executeRequest()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=executeRequest-String_String|class=node}{tr:id=name}{td}h6.executeRequest{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Response]{span}{span:id=iets|style=float: left; font-weight: bold;}executeRequest{span}{span:id=iets|style=float: left;}\(userName, password){span}{td}{tr}{tr:id=des}{td}{sub-section:executeRequest-String_String_des|trigger=button|text=}{sub-section}{sub-section:executeRequest-String_String_des|trigger=none|class=sIndent}Execute the request method.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:executeRequest-String_String_snc|trigger=button|text=}{sub-section}{sub-section:executeRequest-String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:executeRequest-String_String_prs|trigger=button|text=}{sub-section}{sub-section:executeRequest-String_String_prs|trigger=none|class=sIndent}\{[String]} userName -- the user name
\{[String]} password -- the password
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:executeRequest-String_String_ret|trigger=button|text=}{sub-section}{sub-section:executeRequest-String_String_ret|trigger=none|class=sIndent}[Response]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:executeRequest-String_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeRequest-String_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:executeRequest-String_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeRequest-String_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:executeRequest-String_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:executeRequest-String_String_sam|trigger=none}{code:language=javascript}
var response = method.executeRequest()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}prs
Parameters
sIndentusernamethe user namepasswordthe passwordsuccessCallbackMethodcallbackMethod to be called after response is receivederrorCallbackMethodcallbackMethod to be called if request errors outclients
Execute the request method asynchronous using windows authentication.
Success callback method will be called when response is received. Response is sent as parameter in callback followed by any 'callbackExtraArgs' that were given.
This Response can be a response with a different status code then just 200, it could also be 500, which is still a valid response from the server, this won't go into the error callback.
So you need to test the Reponse.getStatusCode() for that to know if everything did go OK.
If no response is received (request errors out, network errors), the errorCallbackMethod is called with exception message as parameter followed by any 'callbackExtraArgs' that were given.
prs
Parameters
sIndentusernamethe user namepasswordthe passwordsuccessCallbackMethodcallbackMethod to be called after response is receivederrorCallbackMethodcallbackMethod to be called if request errors outcallbackExtraArgsextra arguments that will be passed to the callback methods; can be used to identify from which request the response arrived when using the same callback method for multiple requests. Please use only simple JSON arguments (primitive types or array/objects of primitive types)clients
Execute the request method asynchronous. Success callback method will be called when response is received.
Response is sent as parameter in callback.
This Response can be a response with a different status code then just 200, it could also be 500, which is still a valid response from the server, this won't go into the error callback.
So you need to test the Reponse.getStatusCode() for that to know if everything did go OK.
If no response is received (request errors out), the errorCallbackMethod is called with exception message as parameter.
prs
Parameters
sIndentsuccessCallbackMethodcallbackMethod to be called after response is receivederrorCallbackMethodcallbackMethod to be called if request errors outclients
Execute the request method asynchronous using windows authentication.
Success callback method will be called when response is received. Response is sent as parameter in callback followed by any 'callbackExtraArgs' that were given.
This Response can be a response with a different status code then just 200, it could also be 500, which is still a valid response from the server, this won't go into the error callback.
So you need to test the Reponse.getStatusCode() for that to know if everything did go OK.
If no response is received (request errors out, network errors), the errorCallbackMethod is called with exception message as parameter followed by any 'callbackExtraArgs' that were given.
prs
Parameters
sIndentsuccessCallbackMethodcallbackMethod to be called after response is receivederrorCallbackMethodcallbackMethod to be called if request errors outcallbackExtraArgsextra arguments that will be passed to the callback methods; can be used to identify from which request the response arrived when using the same callback method for multiple requests. Please use only simple JSON arguments (primitive types or array/objects of primitive types)clients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowexecuteRequestname
executeRequest()
dessIndent
Execute the request method.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowexecuteRequestname
executeRequest(userName, password)
dessIndent
Execute the request method.
prs
Parameters
sIndentuserNamethe user namepasswordthe passwordret
Execute a request method using windows authentication.
prs
Parameters
sIndentuserNamethe user namepasswordthe passwordworkstationThe workstation the authentication request is originating from.domainThe domain to authenticate within.ret
Whatever to use preemptive authentication (sending the credentials in the header, avoiding the server request to
the client - useful when uploading files, as some http servers would cancel the first request from the client, if too big,
as the authentication request to the client was not yet sent)