Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
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


HTML Table
classservoy sReturnTypes
Table Row (tr)
styleheight: 30px;
Table Head (th)
Return Types
Table Row (tr)
Table Cell (td)
Span
classsWordList
Cookie
Span
classsWordList
Poster

HTML Table
classservoy sSummery
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summery
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#createHttpClient(http_clientname)
Create a named http client (like a web browser with session binding) usable todo multiple request/posts in same server session.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#deleteHttpClient(http_clientname)
Delete a named http client.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Cookie
Table Cell (td)
#getHttpClientCookie(clientName, cookieName)
Get cookie object from the specified client.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Cookie[]
Table Cell (td)
#getHttpClientCookies(clientName)
Returns a Cookie array with all the cookies set on the specified client.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getLastPageCharset()
Get the charset of the last page received with getPageData(.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
#getMediaData(url, [http_clientname])
Get media (binary data) such as images in a variable.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getPageData(url, [http_clientname], [username], [password])
Get all page html in a variable (authentication only works with http client usage).
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Poster
Table Cell (td)
#getPoster(url, [http_clientname])
Get poster object to do http (file) posts.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#put(clientName, url, fileName, filePath, [username], [password])
Put a file at the specified URL.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#setClientProxyUserNamePassword(username, password)
Set the proxy username and password.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#setHttpClientCookie(clientName, cookieName, cookieValue, [domain], [path], [maxAge], [secure])
Add cookie to the specified client.

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idcreateHttpClient
classnode
Table Row (tr)
idname
Table Cell (td)
createHttpClient
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
createHttpClient
Span
stylefloat: left;
idiets
(http_clientname)
Table Row (tr)
iddes
Table Cell (td)
Create a named http client (like a web browser with session binding) usable todo multiple request/posts in same server session.
Table Row (tr)
idprs
Table Cell (td)
Parameters
http_clientname
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
plugins.http.createHttpClient('mybrowser');
var pageData = plugins.http.getPageData('http://www.cnn.com','mybrowser','username','mypassword');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
iddeleteHttpClient
classnode
Table Row (tr)
idname
Table Cell (td)
deleteHttpClient
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
deleteHttpClient
Span
stylefloat: left;
idiets
(http_clientname)
Table Row (tr)
iddes
Table Cell (td)
Delete a named http client.
Table Row (tr)
idprs
Table Cell (td)
Parameters
http_clientname
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
plugins.http.deleteHttpClient('mybrowser');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetHttpClientCookie
classnode
Table Row (tr)
idname
Table Cell (td)
getHttpClientCookie
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Cookie
Span
stylefloat: left; font-weight: bold;
idiets
getHttpClientCookie
Span
stylefloat: left;
idiets
(clientName, cookieName)
Table Row (tr)
iddes
Table Cell (td)
Get cookie object from the specified client.
Table Row (tr)
idprs
Table Cell (td)
Parameters
clientName
cookieName
Table Row (tr)
idret
Table Cell (td)
Returns
Cookie
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var cookie = plugins.http.getHttpClientCookie('clientName', 'JSESSIONID');
if (cookie != null)
{
	// do something
}
else
	plugins.http.setHttpClientCookie('clientName', 'JSESSIONID', 'abc', 'localhost', '/', -1, false)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetHttpClientCookies
classnode
Table Row (tr)
idname
Table Cell (td)
getHttpClientCookies
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Cookie[]
Span
stylefloat: left; font-weight: bold;
idiets
getHttpClientCookies
Span
stylefloat: left;
idiets
(clientName)
Table Row (tr)
iddes
Table Cell (td)
Returns a Cookie array with all the cookies set on the specified client.
Table Row (tr)
idprs
Table Cell (td)
Parameters
clientName
Table Row (tr)
idret
Table Cell (td)
Returns
Cookie[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var cookies = plugins.http.getHttpClientCookies('clientName')
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetLastPageCharset
classnode
Table Row (tr)
idname
Table Cell (td)
getLastPageCharset
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getLastPageCharset
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the charset of the last page received with getPageData(...)
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var a = plugins.http.getPageData('http://www.google.com.hk');
var charset = plugins.http.getLastPageCharset();
var success = plugins.file.writeTXTFile('someFilePath', a, charset);
if (!success) plugins.dialogs.showWarningDialog('Warning', 'Could not write file', 'OK');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetMediaData
classnode
Table Row (tr)
idname
Table Cell (td)
getMediaData
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
byte[]
Span
stylefloat: left; font-weight: bold;
idiets
getMediaData
Span
stylefloat: left;
idiets
(url, [http_clientname])
Table Row (tr)
iddes
Table Cell (td)
Get media (binary data) such as images in a variable. It also supports gzip-ed content.
Table Row (tr)
idprs
Table Cell (td)
Parameters
url
[http_clientname]
Table Row (tr)
idret
Table Cell (td)
Returns
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var image_byte_array = plugins.http.getMediaData('http://www.cnn.com/cnn.gif');
var image_byte_array2 = plugins.http.getMediaData('http://www.cnn.com/cnn.gif', 'clientName');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetPageData
classnode
Table Row (tr)
idname
Table Cell (td)
getPageData
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getPageData
Span
stylefloat: left;
idiets
(url, [http_clientname], [username], [password])
Table Row (tr)
iddes
Table Cell (td)
Get all page html in a variable (authentication only works with http client usage). If name is provided a http client will be created/used.
Table Row (tr)
idprs
Table Cell (td)
Parameters
url
[http_clientname]
[username]
[password]
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// get data using a default connection
var pageData = plugins.http.getPageData('http://www.cnn.com');
// create an http client and use it to get the data
var pageData = plugins.http.getPageData('http://www.cnn.com','myclient');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetPoster
classnode
Table Row (tr)
idname
Table Cell (td)
getPoster
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Poster
Span
stylefloat: left; font-weight: bold;
idiets
getPoster
Span
stylefloat: left;
idiets
(url, [http_clientname])
Table Row (tr)
iddes
Table Cell (td)
Get poster object to do http (file) posts. If posting files, it will post multipart!
Table Row (tr)
idprs
Table Cell (td)
Parameters
url
[http_clientname]
Table Row (tr)
idret
Table Cell (td)
Returns
Poster
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var poster = plugins.http.getPoster('http://www.abc.com/apply_form.jsp');
var didAddParam = poster.addParameter('myParamName','myValue');
var didAddFile = poster.addFile('myFileParamName','manual.doc','c:/temp/manual_01a.doc');
var httpCode = poster.doPost('username','mypassword'); //httpCode 200 is ok
//var httpCode = poster.doPost('username','mypassword'); //use if authentication is needed
var pageData = poster.getPageData()
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idput
classnode
Table Row (tr)
idname
Table Cell (td)
put
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
put
Span
stylefloat: left;
idiets
(clientName, url, fileName, filePath, [username], [password])
Table Row (tr)
iddes
Table Cell (td)
Put a file at the specified URL.
Table Row (tr)
idprs
Table Cell (td)
Parameters
clientName
url
fileName
filePath
[username]
[password]
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var fileAdded = plugins.http.put('clientName', 'http://www.abc.com/put_stuff.jsp', 'manual.doc', 'c:/temp/manual_01a.doc', 'user', 'password')
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetClientProxyUserNamePassword
classnode
Table Row (tr)
idname
Table Cell (td)
setClientProxyUserNamePassword
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
setClientProxyUserNamePassword
Span
stylefloat: left;
idiets
(username, password)
Table Row (tr)
iddes
Table Cell (td)
Set the proxy username and password. Used for named http clients ( else use implicit java data).
Table Row (tr)
idprs
Table Cell (td)
Parameters
username
password
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
plugins.http.setClientProxyUserNamePassword('my_proxy_username','my_proxy_password');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetHttpClientCookie
classnode
Table Row (tr)
idname
Table Cell (td)
setHttpClientCookie
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
setHttpClientCookie
Span
stylefloat: left;
idiets
(clientName, cookieName, cookieValue, [domain], [path], [maxAge], [secure])
Table Row (tr)
iddes
Table Cell (td)
Add cookie to the specified client.
Table Row (tr)
idprs
Table Cell (td)
Parameters
clientName
cookieName
cookieValue
[domain]
[path]
[maxAge]
[secure]
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var cookieSet = plugins.http.setHttpClientCookie('clientName', 'JSESSIONID', 'abc', 'localhost', '/', -1, false)
if (cookieSet)
{
	//do something
}
Table Row (tr)
classlastDetailRow
Table Cell (td)