{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{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)
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}{tbody}{tr}{td}void{td}{td}[#setBodyContent]\(content)
Set the body of the request.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setBodyContent]\(content, mimeType)
Set the body of the request and content mime type.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setCharset]\(charset)
Set the charset used when posting.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#setFile]\(filePath)
Set a file to put.{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=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=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=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=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=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=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=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}{tbody:id=setBodyContent-String}{tr:id=name}{td}h6.setBodyContent{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setBodyContent{span}{span}\(content){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} content
{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.setBodyContent(content)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setBodyContent-String_String}{tr:id=name}{td}h6.setBodyContent{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setBodyContent{span}{span}\(content, mimeType){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} content
\{[String]} mimeType
{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.setBodyContent(content, 'text/xml')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setCharset-}{tr:id=name}{td}h6.setCharset{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setCharset{span}{span}\(charset){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}charset
{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}
var client = plugins.http.createNewHttpClient();
var poster = client.createPostRequest('https://twitter.com/statuses/update.json');
poster.addParameter('status',scopes.globals.textToPost);
poster.addParameter('source','Test Source');
poster.setCharset('UTF-8');
var httpCode = poster.executeRequest(scopes.globals.twitterUserName, scopes.globals.twitterPassword).getStatusCode() // httpCode 200 is ok
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setFile-String}{tr:id=name}{td}h6.setFile{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}setFile{span}{span}\(filePath){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} filePath
{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}
putRequest.setFile('c:/temp/manual_01a.doc')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}