Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
id | createDeleteRequest-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createDeleteRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates a new delete request (a request to delete a resource on server). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var client = plugins.http.createNewHttpClient();
var request = client.createDeleteRequest('http://www.servoy.com/delete.me');
var response = request.executeRequest();
var httpCode = response.getStatusCode(); // httpCode 200 is ok"
var content = response.getResponseBody(); |
|
|
|
|
Table Body (tbody) |
---|
id | createGetRequest-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createGetRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates a new get request (retrieves whatever information is stored on specified url). If this url is a https ssl encrypted url which certificates are not in the java certificate store. (Like a self signed certificate or a none existing root certificate) Then for a smart client a dialog will be given, to give the user the ability to accept this certificate for the next time. For a Web or Headless client the system administrator does have to add that certificate (chain) to the java install on the server. See http://wiki.servoy.com/display/tutorials/Import+a+%28Root%29+certificate+in+the+java+cacerts+file |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var client = plugins.http.createNewHttpClient();
var request = client.createGetRequest('http://www.servoy.com');
var response = request.executeRequest();
var httpCode = response.getStatusCode(); // httpCode 200 is ok"
var content = response.getResponseBody(); |
|
|
|
|
Table Body (tbody) |
---|
id | createHeadRequest-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createHeadRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates a new head request (similar to get request, must not contain body content). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var client = plugins.http.createNewHttpClient();
var request = client.createHeadRequest('http://www.servoy.com');
var response = request.executeRequest();
var httpCode = response.getStatusCode(); // httpCode 200 is ok
var header = response.getResponseHeaders('last-modified'); |
|
|
|
|
Table Body (tbody) |
---|
id | createOptionsRequest-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createOptionsRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates a new options request (a request for information about communication options). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var client = plugins.http.createNewHttpClient();
var request = client.createOptionsRequest('http://www.servoy.com');
var methods = request.getAllowedMethods(request.executeRequest()); |
|
|
|
|
Table Body (tbody) |
---|
id | createPostRequest-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createPostRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Create a new post request ( Origin server should accept/process the submitted data.) If this url is a https ssl encrypted url which certificates are not in the java certificate store. (Like a self signed certificate or a none existing root certificate) Then for a smart client a dialog will be given, to give the user the ability to accept this certificate for the next time. For a Web or Headless client the system administrator does have to add that certificate (chain) to the java install on the server. See http://wiki.servoy.com/display/tutorials/Import+a+%28Root%29+certificate+in+the+java+cacerts+file |
|
|
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',globals.textToPost);
poster.addParameter('source','Test Source');
poster.setCharset('UTF-8');
var httpCode = poster.executeRequest(globals.twitterUserName, globals.twitterPassword).getStatusCode(); // httpCode 200 is ok |
|
|
|
|
Table Body (tbody) |
---|
id | createPutRequest-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createPutRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates a new put request (similar to post request, contains information to be submitted). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var client = plugins.http.createNewHttpClient();
var request = client.createPutRequest('http://jakarta.apache.org');
request.setFile('UploadMe.gif');
var httpCode = putRequest.executeRequest().getStatusCode() // httpCode 200 is ok |
|
|
|
|
Table Body (tbody) |
---|
id | createTraceRequest-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createTraceRequest |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates a new trace request (debug request, server will just echo back). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var client = plugins.http.createNewHttpClient();
var response = request.executeRequest();
var httpCode = response.getStatusCode(); // httpCode 200 is ok"
var content = response.getResponseBody(); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var cookie = client.getCookie('JSESSIONID');
if (cookie != null)
{
// do something
}
else
client.setCookie('JSESSIONID', 'abc', 'localhost', '/', -1, false) |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getCookies |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Get all cookies from this client. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var cookies = client.getHttpClientCookies() |
|
|
|
|
Table Body (tbody) |
---|
id | setClientProxyCredentials-String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setClientProxyCredentials |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
| setClientProxyCredentials |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set proxy credentials. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| client.setClientProxyCredentials('my_proxy_username','my_proxy_password'); |
|
|
|
|
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setCookie|class=node}{tr:id=name}{td}h6.setCookie{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}setCookie{span}{span:id=iets|style=float: left;}\(cookieName, cookieValue, \[domain\], \[path\], \[maxAge\], \[secure\]){span}{td}{tr}{tr:id=des}{td}{sub-section:setCookie_des|text=|trigger=button}{sub-section}{sub-section:setCookie_des|trigger=none|class=sIndent}Add cookie to the this client.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setCookie_snc|text=|trigger=button}{sub-section}{sub-section:setCookie_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setCookie_prs|text=|trigger=button}{sub-section}{sub-section:setCookie_prs|trigger=none|class=sIndent}cookieName
cookieValue
\[domain\]
\[path\]
\[maxAge\]
\[secure\]
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setCookie_ret|text=|trigger=button}{sub-section}{sub-section:setCookie_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setCookie_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setCookie_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setCookie_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setCookie_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setCookie_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setCookie_sam|trigger=none}{code:language=javascript}
Table Body (tbody) |
---|
id | setCookie-String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(cookieName, cookieValue) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add cookie to the this client. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} cookieName - the name of the cookie {String} cookieValue - the value of the cookie |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var cookieSet = client.setCookie('JSESSIONID', 'abc', 'localhost', '/', -1, false)
if (cookieSet)
{
//do something
} |
|
|
|
|
Table Body (tbody) |
---|
id | setCookie-String_String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(cookieName, cookieValue, domain) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add cookie to the this client. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} cookieName - the name of the cookie {String} cookieValue - the value of the cookie {String} domain - the domain |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var cookieSet = client.setCookie('JSESSIONID', 'abc', 'localhost', '/', -1, false)
if (cookieSet)
{
//do something
} |
|
|
|
|
Table Body (tbody) |
---|
id | setCookie-String_String_String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(cookieName, cookieValue, domain, path) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add cookie to the this client. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} cookieName - the name of the cookie {String} cookieValue - the value of the cookie {String} domain - the domain {String} path - the path |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var cookieSet = client.setCookie('JSESSIONID', 'abc', 'localhost', '/', -1, false)
if (cookieSet)
{
//do something
} |
|
|
|
|
Table Body (tbody) |
---|
id | setCookie-String_String_String_String_Number |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(cookieName, cookieValue, domain, path, maxAge) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add cookie to the this client. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} cookieName - the name of the cookie {String} cookieValue - the value of the cookie {String} domain - the domain {String} path - the path {Number} maxAge - maximum age of cookie |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var cookieSet = client.setCookie('JSESSIONID', 'abc', 'localhost', '/', -1, false)
if ( |
|
|
|
| cookieSet)
{
//do something
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setTimeout|class=node}{tr:id=name}{td}h6.setTimeout{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setTimeout{span}{span:id=iets|style=float: left;}\(msTimeout){span}{td}{tr}{tr:id=des}{td}{sub-section:setTimeout_des|text=|trigger=button}{sub-section}{sub-section:setTimeout_des|trigger=none|class=sIndent}Sets a timeout in milliseconds for retrieving of data (when 0 there is no timeout).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setTimeout_snc|text=|trigger=button}{sub-section}{sub-section:setTimeout_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setTimeout_prs|text=|trigger=button}{sub-section}{sub-section:setTimeout_prs|trigger=none|class=sIndent}msTimeout
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setTimeout_ret|text=|trigger=button}{sub-section}{sub-section:setTimeout_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setTimeout_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setTimeout_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setTimeout_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setTimeout_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setTimeout_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setTimeout_sam|trigger=none}{code:language=javascript}
client.setTimeout(1000)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}cookieSet)
{
//do something
} |
|
|
|
|
Table Body (tbody) |
---|
id | setCookie-String_String_String_String_Number_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(cookieName, cookieValue, domain, path, maxAge, secure) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add cookie to the this client. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} cookieName - the name of the cookie {String} cookieValue - the value of the cookie {String} domain - the domain {String} path - the path {Number} maxAge - maximum age of cookie {Boolean} secure - true if it is a secure cookie, false otherwise |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var cookieSet = client.setCookie('JSESSIONID', 'abc', 'localhost', '/', -1, false)
if (cookieSet)
{
//do something
} |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setTimeout |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Sets a timeout in milliseconds for retrieving of data (when 0 there is no timeout). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| client.setTimeout(1000) |
|
|
|
|
|