Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{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{hidden}
{sub-section:description|text=}{sub-section}\\ 

{table:id=|class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[Cookie]{span}{span:class=sWordList}[PosterDeleteRequest]{span}{span:class=sWordList}[GetRequest]{tdspan}{tr}{table}\\ 

{table:id=|class=servoy sSummery}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summery{th}{tr}{tbody}{tr}{td}void{td}{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.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#deleteHttpClient]\(http_clientname)
Delete a named http client.{tdspan:class=sWordList}[HTTP_STATUS]{span}{span:class=sWordList}[HeadRequest]{span}{span:class=sWordList}[HttpClient]{span}{span:class=sWordList}[OptionsRequest]{span}{span:class=sWordList}[PostRequest]{span}{span:class=sWordList}[PutRequest]{span}{span:class=sWordList}[Response]{span}{span:class=sWordList}[TraceRequest]{span}{td}{tr}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tbody}{tr}{td}[CookieHttpClient]{td}{td}[#getHttpClientCookie#createNewHttpClient]\(clientName, cookieName)
Get cookie object from the specified client()
Create an http client (like a web browser with session binding) usable todo multiple request/posts in same server session.{td}{tr}{tbody}{tbody}{tr}{td}byte[Cookie]\[]{td}{td}[#getHttpClientCookies#getMediaData]\(clientNameurl, \[http_clientname\])
ReturnsGet amedia Cookie(binary arraydata) withsuch allas theimages cookiesin set on the specified clienta variable.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getLastPageCharset#getPageData]\(url)
Get theall charsetpage ofhtml thein last page received with getPageData(a variable.{td}{tr}{tbody}{tbodytable}{tr}{td}byte[]{td}{td}[#getMediaData]\(url, \[http_clientname\])
Get media (binary data) such as images in a variable.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getPageData]\(url, \[http_clientname\], \[username\], \[password\])
Get all page html in a variable (authentication only works with http client usage).{td}{tr}{tbody}{tbody}{tr}{td}[Poster]{td}{td}[#getPoster]\(url, \[http_clientname\])
Get poster object to do http (file) posts.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#put]\(clientName, url, fileName, filePath, \[username\], \[password\])
Put a file at the specified URL.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setClientProxyUserNamePassword]\(username, password)
Set the proxy username and password.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#setHttpClientCookie]\(clientName, cookieName, cookieValue, \[domain\], \[path\], \[maxAge\], \[secure\])
Add cookie to the specified client.{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=createHttpClient|class=node}{tr:id=name}{td}h6.createHttpClient{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}createHttpClient{span}{span:id=iets|style=float: left;}\(http_clientname){span}{td}{tr}{tr:id=des}{td}{sub-section:createHttpClient_des|text=|trigger=button}{sub-section}{sub-section:createHttpClient_des|trigger=none|class=sIndent}Create a named http client (like a web browser with session binding) usable todo multiple request/posts in same server session.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:createHttpClient_snc|text=|trigger=button}{sub-section}{sub-section:createHttpClient_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:createHttpClient_prs|text=|trigger=button}{sub-section}{sub-section:createHttpClient_prs|trigger=none|class=sIndent}http_clientname
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:createHttpClient_ret|text=|trigger=button}{sub-section}{sub-section:createHttpClient_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:createHttpClient_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createHttpClient_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:createHttpClient_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createHttpClient_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:createHttpClient_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createHttpClient_sam|trigger=none}{code:language=javascript}
plugins.http.createHttpClient('mybrowser');
var pageData = plugins.http.getPageData('http://www.cnn.com','mybrowser','username','mypassword');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=deleteHttpClient|class=node}{tr:id=name}{td}h6.deleteHttpClient{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}deleteHttpClient{span}{span:id=iets|style=float: left;}\(http_clientname){span}{td}{tr}{tr:id=des}{td}{sub-section:deleteHttpClient_des|text=|trigger=button}{sub-section}{sub-section:deleteHttpClient_des|trigger=none|class=sIndent}Delete a named http client.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:deleteHttpClient_snc|text=|trigger=button}{sub-section}{sub-section:deleteHttpClient_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:deleteHttpClient_prs|text=|trigger=button}{sub-section}{sub-section:deleteHttpClient_prs|trigger=none|class=sIndent}http_clientname
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:deleteHttpClient_ret|text=|trigger=button}{sub-section}{sub-section:deleteHttpClient_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:deleteHttpClient_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:deleteHttpClient_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:deleteHttpClient_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:deleteHttpClient_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:deleteHttpClient_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:deleteHttpClient_sam|trigger=none}{code:language=javascript}
plugins.http.deleteHttpClient('mybrowser');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getHttpClientCookie|class=node}{tr:id=name}{td}h6.getHttpClientCookie{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Cookie]{span}{span:id=iets|style=float: left; font-weight: bold;}getHttpClientCookie{span}{span:id=iets|style=float: left;}\(clientName, cookieName){span}{td}{tr}{tr:id=des}{td}{sub-section:getHttpClientCookie_des|text=|trigger=button}{sub-section}{sub-section:getHttpClientCookie_des|trigger=none|class=sIndent}Get cookie object from the specified client.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getHttpClientCookie_snc|text=|trigger=button}{sub-section}{sub-section:getHttpClientCookie_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getHttpClientCookie_prs|text=|trigger=button}{sub-section}{sub-section:getHttpClientCookie_prs|trigger=none|class=sIndent}clientName
cookieName
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getHttpClientCookie_ret|text=|trigger=button}{sub-section}{sub-section:getHttpClientCookie_ret|trigger=none|class=sIndent}[Cookie]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getHttpClientCookie_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getHttpClientCookie_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getHttpClientCookie_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getHttpClientCookie_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getHttpClientCookie_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getHttpClientCookie_sam|trigger=none}{code:language=javascript}
var cookie = plugins.http.getHttpClientCookie('clientName', 'JSESSIONID');
if (cookie != null)
{
	// do something
}
else
	plugins.http.setHttpClientCookie('clientName', 'JSESSIONID', 'abc', 'localhost', '/', -1, false)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getHttpClientCookies|class=node}{tr:id=name}{td}h6.getHttpClientCookies{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Cookie]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getHttpClientCookies{span}{span:id=iets|style=float: left;}\(clientName){span}{td}{tr}{tr:id=des}{td}{sub-section:getHttpClientCookies_des|text=|trigger=button}{sub-section}{sub-section:getHttpClientCookies_des|trigger=none|class=sIndent}Returns a Cookie array with all the cookies set on the specified client.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getHttpClientCookies_snc|text=|trigger=button}{sub-section}{sub-section:getHttpClientCookies_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getHttpClientCookies_prs|text=|trigger=button}{sub-section}{sub-section:getHttpClientCookies_prs|trigger=none|class=sIndent}clientName
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getHttpClientCookies_ret|text=|trigger=button}{sub-section}{sub-section:getHttpClientCookies_ret|trigger=none|class=sIndent}[Cookie]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getHttpClientCookies_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getHttpClientCookies_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getHttpClientCookies_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getHttpClientCookies_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getHttpClientCookies_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getHttpClientCookies_sam|trigger=none}{code:language=javascript}
var cookies = plugins.http.getHttpClientCookies('clientName')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getLastPageCharset|class=node}{tr:id=name}{td}h6.getLastPageCharset{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getLastPageCharset{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getLastPageCharset_des|text=|trigger=button}{sub-section}{sub-section:getLastPageCharset_des|trigger=none|class=sIndent}Get the charset of the last page received with getPageData(...){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getLastPageCharset_snc|text=|trigger=button}{sub-section}{sub-section:getLastPageCharset_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getLastPageCharset_prs|text=|trigger=button}{sub-section}{sub-section:getLastPageCharset_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getLastPageCharset_ret|text=|trigger=button}{sub-section}{sub-section:getLastPageCharset_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getLastPageCharset_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getLastPageCharset_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getLastPageCharset_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getLastPageCharset_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getLastPageCharset_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getLastPageCharset_sam|trigger=none}{code:language=javascript}
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');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMediaData|class=node}{tr:id=name}{td}h6.getMediaData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}getMediaData{span}{span:id=iets|style=float: left;}\(url, \[http_clientname\]){span}{td}{tr}{tr:id=des}{td}{sub-section:getMediaData_des|text=|trigger=button}{sub-section}{sub-section:getMediaData_des|trigger=none|class=sIndent}Get media (binary data) such as images in a variable. It also supports gzip\-ed content.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMediaData_snc|text=|trigger=button}{sub-section}{sub-section:getMediaData_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getMediaData_prs|text=|trigger=button}{sub-section}{sub-section:getMediaData_prs|trigger=none|class=sIndent}url
\[http\_clientname\]
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getMediaData_ret|text=|trigger=button}{sub-section}{sub-section:getMediaData_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMediaData_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMediaData_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMediaData_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMediaData_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMediaData_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMediaData_sam|trigger=none}{code:language=javascript}
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');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getPageData|class=node}{tr:id=name}{td}h6.getPageData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getPageData{span}{span:id=iets|style=float: left;}\(url, \[http_clientname\], \[username\], \[password\]){span}{td}{tr}{tr:id=des}{td}{sub-section:getPageData_des|text=|trigger=button}{sub-section}{sub-section:getPageData_des|trigger=none|class=sIndent}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.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getPageData_snc|text=|trigger=button}{sub-section}{sub-section:getPageData_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getPageData_prs|text=|trigger=button}{sub-section}{sub-section:getPageData_prs|trigger=none|class=sIndent}url
\[http\_clientname\]
\[username\]
\[password\]
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getPageData_ret|text=|trigger=button}{sub-section}{sub-section:getPageData_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getPageData_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPageData_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getPageData_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPageData_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getPageData_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPageData_sam|trigger=none}{code:language=javascript}
// 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');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getPoster|class=node}{tr:id=name}{td}h6.getPoster{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Poster]{span}{span:id=iets|style=float: left; font-weight: bold;}getPoster{span}{span:id=iets|style=float: left;}\(url, \[http_clientname\]){span}{td}{tr}{tr:id=des}{td}{sub-section:getPoster_des|text=|trigger=button}{sub-section}{sub-section:getPoster_des|trigger=none|class=sIndent}Get poster object to do http (file) posts. If posting files, it will post multipart!{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getPoster_snc|text=|trigger=button}{sub-section}{sub-section:getPoster_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getPoster_prs|text=|trigger=button}{sub-section}{sub-section:getPoster_prs|trigger=none|class=sIndent}url
\[http\_clientname\]
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getPoster_ret|text=|trigger=button}{sub-section}{sub-section:getPoster_ret|trigger=none|class=sIndent}[Poster]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getPoster_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPoster_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getPoster_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPoster_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getPoster_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPoster_sam|trigger=none}{code:language=javascript}
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()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=put\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=createNewHttpClient|class=node}{tr:id=name}{td}h6.putcreateNewHttpClient{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[BooleanHttpClient]{span}{span:id=iets|style=float: left; font-weight: bold;}putcreateNewHttpClient{span}{span:id=iets|style=float: left;}\(clientName, url, fileName, filePath, \[username\], \[password\]|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:putcreateNewHttpClient_des|text=|trigger=button}{sub-section}{sub-section:putcreateNewHttpClient_des|trigger=none|class=sIndent}PutCreate an http client (like a file at the specified URL web browser with session binding) usable todo multiple request/posts in same server session.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:putcreateNewHttpClient_snc|text=|trigger=button}{sub-section}{sub-section:putcreateNewHttpClient_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:putcreateNewHttpClient_prs|text=|trigger=button}{sub-section}{sub-section:putcreateNewHttpClient_prs|trigger=none|class=sIndent}clientName
url
fileName
filePath
\[username\]
\[password\]
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:putcreateNewHttpClient_ret|text=|trigger=button}{sub-section}{sub-section:putcreateNewHttpClient_ret|trigger=none|class=sIndent}[BooleanHttpClient]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:putcreateNewHttpClient_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putcreateNewHttpClient_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:putcreateNewHttpClient_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putcreateNewHttpClient_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:putcreateNewHttpClient_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putcreateNewHttpClient_sam|trigger=none}{code:language=javascript}
var fileAdded = plugins.http.put('clientName', 'http://www.abc.com/put_stuff.jsp', 'manual.doc', 'c:/temp/manual_01a.doc', 'user', 'password')=javascript}
var client = plugins.http.createNewHttpClient();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setClientProxyUserNamePasswordgetMediaData|class=node}{tr:id=name}{td}h6.setClientProxyUserNamePasswordgetMediaData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}voidbyte[]{span}{span:id=iets|style=float: left; font-weight: bold;}setClientProxyUserNamePasswordgetMediaData{span}{span:id=iets|style=float: left;}\(usernameurl, password\[http_clientname\]){span}{td}{tr}{tr:id=des}{td}{sub-section:setClientProxyUserNamePasswordgetMediaData_des|text=|trigger=button}{sub-section}{sub-section:setClientProxyUserNamePasswordgetMediaData_des|trigger=none|class=sIndent}SetGet themedia proxy username and password. Used for named http clients ( else use implicit java data)(binary data) such as images in a variable. It also supports gzip\-ed content.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setClientProxyUserNamePasswordgetMediaData_snc|text=|trigger=button}{sub-section}{sub-section:setClientProxyUserNamePasswordgetMediaData_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setClientProxyUserNamePasswordgetMediaData_prs|text=|trigger=button}{sub-section}{sub-section:setClientProxyUserNamePasswordgetMediaData_prs|trigger=none|class=sIndent}username
passwordurl
\[http\_clientname\]
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setClientProxyUserNamePasswordgetMediaData_ret|text=|trigger=button}{sub-section}{sub-section:setClientProxyUserNamePasswordgetMediaData_ret|trigger=none|class=sIndent}voidbyte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setClientProxyUserNamePasswordgetMediaData_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setClientProxyUserNamePasswordgetMediaData_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setClientProxyUserNamePasswordgetMediaData_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setClientProxyUserNamePasswordgetMediaData_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setClientProxyUserNamePasswordgetMediaData_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setClientProxyUserNamePasswordgetMediaData_sam|trigger=none}{code:language=javascript}{code:language=javascript}
var image_byte_array = plugins.http.setClientProxyUserNamePassword('my_proxy_username','my_proxy_passwordgetMediaData('http://www.cnn.com/cnn.gif');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setHttpClientCookiegetPageData|class=node}{tr:id=name}{td}h6.setHttpClientCookiegetPageData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[BooleanString]{span}{span:id=iets|style=float: left; font-weight: bold;}setHttpClientCookiegetPageData{span}{span:id=iets|style=float: left;}\(clientName, cookieName, cookieValue, \[domain\], \[path\], \[maxAge\], \[secure\]: left;}\(url){span}{td}{tr}{tr:id=des}{td}{sub-section:setHttpClientCookiegetPageData_des|text=|trigger=button}{sub-section}{sub-section:setHttpClientCookiegetPageData_des|trigger=none|class=sIndent}AddGet all cookiepage tohtml thein specifieda clientvariable.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setHttpClientCookiegetPageData_snc|text=|trigger=button}{sub-section}{sub-section:setHttpClientCookiegetPageData_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setHttpClientCookiegetPageData_prs|text=|trigger=button}{sub-section}{sub-section:setHttpClientCookiegetPageData_prs|trigger=none|class=sIndent}clientName
cookieName
cookieValue
\[domain\]
\[path\]
\[maxAge\]
\[secure\]
url
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setHttpClientCookiegetPageData_ret|text=|trigger=button}{sub-section}{sub-section:setHttpClientCookiegetPageData_ret|trigger=none|class=sIndent}[BooleanString]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setHttpClientCookiegetPageData_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setHttpClientCookiegetPageData_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setHttpClientCookiegetPageData_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setHttpClientCookiegetPageData_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setHttpClientCookiegetPageData_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setHttpClientCookiegetPageData_sam|trigger=none}{code:language=javascript}
// get data using a default connection
var cookieSetpageData = plugins.http.setHttpClientCookie('clientName', 'JSESSIONID', 'abc', 'localhost', '/', -1, false)
if (cookieSet)
{
	//do something
}getPageData('http://www.cnn.com');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}