Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
id | addHeader-String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add a header to the request. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| method.addHeader('Content-type','text/xml; charset=ISO-8859-1') |
|
|
|
|
Table Body (tbody) |
---|
id | executeAsyncRequest-String_String_String_String_Function_Function |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
executeAsyncRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(username, password, workstation, domain, successCallbackMethod, errorCallbackMethod) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. If no response is received (request errors out), the errorCallbackMethod is called with exception message as parameter. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| method.executeAsyncRequest('username','password','mycomputername','domain',globals.successCallback,globals.errorCallback) |
|
|
|
|
Table Body (tbody) |
---|
id | executeAsyncRequest-String_String_Function_Function |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
executeAsyncRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(username, password, successCallbackMethod, errorCallbackMethod) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| method.executeAsyncRequest(globals.successCallback,globals.errorCallback) |
|
|
|
|
Table Body (tbody) |
---|
id | executeAsyncRequest-Function_Function |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
executeAsyncRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(successCallbackMethod, errorCallbackMethod) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Function} successCallbackMethod - callbackMethod to be called after response is received {Function} errorCallbackMethod - callbackMethod to be called if request errors out |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| method.executeAsyncRequest(globals.successCallback,globals.errorCallback) |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
executeRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Execute the request method. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var response = method.executeRequest() |
|
|
|
|
Table Body (tbody) |
---|
id | executeRequest-String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
executeRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Execute the request method. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} userName - the user name {String} password - the password |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var response = method.executeRequest() |
|
|
|
|
Table Body (tbody) |
---|
id | executeRequest-String_String_String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
executeRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(userName, password, workstation, domain) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Execute a request method using windows authentication. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var response = method.executeRequest('username','password','mycomputername','domain'); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setBodyContent |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set the body of the request. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| method.setBodyContent(content) |
|
|
|
|
Table Body (tbody) |
---|
id | setBodyContent-String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setBodyContent |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set the body of the request and content mime type. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| method.setBodyContent(content, 'text/xml') |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setCharset |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set the charset used when posting. If this is null or not called it will use the default charset (UTF-8). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| putRequest.setFile('c:/temp/manual_01a.doc') |
|
|
|
|
|