Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rev: 1381948887907

...

HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
HttpClient
Table Cell (td)
#createNewHttpClientcreateNewHttpClient()
Create an http client (like a web browser with session binding) usable todo multiple request/posts in same server session.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
#getMediaDatagetMediaData(url)
Get media (binary data) such as images in a variable.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getPageDatagetPageData(url)
Get all page html in a variable, if this url is an https url that uses certificates unknown to Java
then you have to use the HttpClient so that smart client users will get the unknown certificate dialog that they then can accept
or you must make sure that those server certificates are stored in the cacerts of the java vm that is used (this is required for a web or headless 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)
idcreateNewHttpClient
Table Row (tr)
idname
Table Cell (td)
createNewHttpClient
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
HttpClient
Span
stylefont-weight: bold;
createNewHttpClient
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an http client (like a web browser with session binding) usable todo multiple request/posts in same server session.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
HttpClient
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var client = plugins.http.createNewHttpClient();

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetMediaData-String
Table Row (tr)
idname
Table Cell (td)
getMediaData
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
byte[]
Span
stylefont-weight: bold;
getMediaData
Span
(url)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get media (binary data) such as images in a variable. It also supports gzip-ed content.
If this url is an https url that uses certificates unknown to Java
then you have to use the HttpClient so that smart client users will get the unknown certificate dialog that they then can accept
or you must make sure that those server certificates are stored in the cacerts of the java vm that is used (this is required for a web or headless client)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} url
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
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');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetPageData-String
Table Row (tr)
idname
Table Cell (td)
getPageData
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getPageData
Span
(url)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get all page html in a variable, if this url is an https url that uses certificates unknown to Java
then you have to use the HttpClient so that smart client users will get the unknown certificate dialog that they then can accept
or you must make sure that those server certificates are stored in the cacerts of the java vm that is used (this is required for a web or headless client)
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} url
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
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');

...

Table Row (tr)
classlastDetailRow
Table Cell (td)