Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Div
styledisplay: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
iddescription



HTML Table
id
classservoy sReturnTypes
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Return Types
Table Row (tr)
Table Cell (td)
Span
classsWordList
Cookie
Span
classsWordList
DeleteRequest
Span
classsWordList
GetRequest
Span
classsWordList
HTTP_STATUS
Span
classsWordList
HeadRequest
Span
classsWordList
HttpClient
Span
classsWordList
OptionsRequest
Span
classsWordList
PostRequest
Span
classsWordList
PutRequest
Span
classsWordList
Response
Span
classsWordList
TraceRequest



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
HttpClient
Table Cell (td)
createNewHttpClient()
Create an http client (like a web browser with session binding) usable todo multiple request/posts in same server session.
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
getMediaData(url)
Get media (binary data) such as images in a variable.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getPageData(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
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
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)