{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}[Boolean]{td}{td}[#addHeader]\(headerName, value)
Add a header to the request.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#executeAsyncRequest]\(username, password, workstation, domain, successCallbackMethod, errorCallbackMethod)
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
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
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.
{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#executeAsyncRequest]\(username, password, successCallbackMethod, errorCallbackMethod)
Execute the request method asynchronous.{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}{tbody}{tr}{td}[Response]{td}{td}[#executeRequest]\(userName, password, workstation, domain)
Execute a request method using windows authentication.{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-String_String}{tr:id=name}{td}h6.addHeader{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}addHeader{span}{span}\(headerName, value){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Add a header to the request.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} headerName
\{[String]} value
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
method.addHeader('Content-type','text/xml; charset=ISO-8859-1')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=executeAsyncRequest-String_String_String_String_Function_Function}{tr:id=name}{td}h6.executeAsyncRequest{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}executeAsyncRequest{span}{span}\(username, password, workstation, domain, successCallbackMethod, errorCallbackMethod){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}
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
. 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 just200, 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.
{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} username -- the user name
\{[String]} password -- the password
\{[String]} workstation -- The workstation the authentication request is originating from.
\{[String]} domain -- The domain to authenticate within.
\{[Function]} successCallbackMethod -- callbackMethod to be called after response is received
\{[Function]} errorCallbackMethod -- callbackMethod to be called if request errors out
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
method.executeAsyncRequest('username','password','mycomputername','domain',globals.successCallback,globals.errorCallback)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=executeAsyncRequest-String_String_Function_Function}{tr:id=name}{td}h6.executeAsyncRequest{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}executeAsyncRequest{span}{span}\(username, password, successCallbackMethod, errorCallbackMethod){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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 alsobe 500, which is still a valid response from the server, this won't go into the error callback.
So you need to testthe 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.
{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div: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
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
method.executeAsyncRequest(globals.successCallback,globals.errorCallback)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=executeAsyncRequest-Function_Function}{tr:id=name}{td}h6.executeAsyncRequest{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}executeAsyncRequest{span}{span}\(successCallbackMethod, errorCallbackMethod){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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 alsobe 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
.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} successCallbackMethod -- callbackMethod to be called after response is received
\{[Function]} errorCallbackMethod -- callbackMethod to be called if request errors out
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
method.executeAsyncRequest(globals.successCallback,globals.errorCallback)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=executeRequest}{tr:id=name}{td}h6.executeRequest{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Response]{span}{span:style=font-weight: bold;}executeRequest{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}
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.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Response]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var response = method.executeRequest()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=executeRequest-String_String}{tr:id=name}{td}h6.executeRequest{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Response]{span}{span:style=font-weight: bold;}executeRequest{span}{span}\(userName, password){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowexecuteRequestname
executeRequest(userName, password)
dessIndent
Execute the request method.
{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} userName -- the user name
\{[String]} password -- the password
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Response]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var response = method.executeRequest()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=executeRequest-String_String_String_String}{tr:id=name}{td}h6.executeRequest{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Response]{span}{span:style=font-weight: bold;}executeRequest{span}{span}\(userName, password, workstation, domain){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}prs
Parameters
sIndentuserNamethe user namepasswordthe passwordret
Execute a request method using windows authentication.
{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} userName -- the user name
\{[String]} password -- the password
\{[String]} workstation -- The workstation the authentication request is originating from.
\{[String]} domain -- The domain to authenticate within.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Response]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var response = method.executeRequest('username','password','mycomputername','domain');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}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)