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.

Enter additional information related to this 'class' inside the {div} macro with 'id=description'


Return Types
Cookie
DeleteRequest
GetRequest
HTTP_STATUS
HeadRequest
HttpClient
OptionsRequest
PostRequest
PutRequest
Response
TraceRequest

Method Summary
HttpClient
#createNewHttpClient()
Create an http client (like a web browser with session binding) usable todo multiple request/posts in same server session.
byte[]
#getMediaData(url)
Get media (binary data) such as images in a variable.
String
#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)

Method Details
createNewHttpClient
HttpClient
createNewHttpClient
()
Create an http client (like a web browser with session binding) usable todo multiple request/posts in same server session.
Returns
HttpClient
Sample
var client = plugins.http.createNewHttpClient();

getMediaData
byte[]
getMediaData
(url)
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)
Parameters
{String} url
Returns
byte[]
Sample
var image_byte_array = plugins.http.getMediaData('http://www.cnn.com/cnn.gif');

getPageData
String
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)
Parameters
{String} url
Returns
String
Sample
// get data using a default connection
var pageData = plugins.http.getPageData('http://www.cnn.com');