All Bundles

HttpClient

HTTP client

Operations

New

Default constructor

New()

AddHeader

Adds a HTTP request header

method : public : AddHeader(name:String, value:String) ~ Nil
Parameters
NameTypeDescription
nameStringheader name
valueStringheader value

CookiesEnabled

Sets cookie support

method : public : CookiesEnabled(cookies_enabled:Bool) ~ Nil
Parameters
NameTypeDescription
cookies_enabledBooltrue if cookies are enabled, false otherwise

Get

Performs a HTTP GET

method : public : Get(url:String) ~ Vector<String>
Parameters
NameTypeDescription
urlStringURL

Return
TypeDescription
Vector<String>vector of read strings

Performs a HTTP GET

method : public : Get(url:String, content_type:String) ~ Vector<String>
Parameters
NameTypeDescription
urlStringURL
content_typeStringcontent type

Return
TypeDescription
Vector<String>vector of read strings

GetAll

Performs a HTTP GET and returns results as a String

function : public : GetAll(url:String) ~ String
Parameters
NameTypeDescription
urlStringURL

Return
TypeDescription
Stringoutput as one string

GetCookies

Gets the cookies

method : public : GetCookies() ~ Vector<String>
Return
TypeDescription
Vector<String>vector of cookies

GetHeaders

Gets the HTTP headers

method : public : GetHeaders() ~ Hash<String,String>
Return
TypeDescription
Hash<String,String>HTTP headers

Post

Performs a HTTP POST

method : public : Post(url:String, data:String) ~ Vector<String>
Parameters
NameTypeDescription
urlStringURL
dataStringdata to post

Return
TypeDescription
Vector<String>vector of read strings

Performs a HTTP POST

method : public : Post(url:String, data:String, content_type:String) ~ Vector<String>
Parameters
NameTypeDescription
urlStringURL
dataStringdata to post
content_typeStringcontent type

Return
TypeDescription
Vector<String>vector of read strings

PostAll

Performs a HTTP POST

function : public : PostAll(url:String, data:String) ~ String
Parameters
NameTypeDescription
urlStringURL
dataStringdata to post

Return
TypeDescription
Stringread strings

Performs a HTTP POST

function : public : PostAll(url:String, data:String, content_type:String) ~ String
Parameters
NameTypeDescription
urlStringURL
dataStringdata to post
content_typeStringcontent type

Return
TypeDescription
Stringread strings

SetCookie

Sets a cookie

method : public : SetCookie(cookie:String) ~ Nil
Parameters
NameTypeDescription
cookieStringcookie nane and value