haXe API Documentation
Back | Index
class haxe.Http
Available in flash8, neko, js, flash, php, cpp
This class can be used to handle Http requests consistently across platforms. There are two intended usages: - call haxe.Http.requestUrl(url) and receive the result as a String (not available on flash) - create a new haxe.Http(url), register your callbacks for onData, onError and onStatus, then call request().
var async : Bool
Available in js
var cnxTimeout : Float
Available in neko, php, cpp
var noShutdown : Bool
Available in neko, php, cpp
var responseData(default,null) : Null<String>
var responseHeaders : haxe.ds.StringMap<String>
Available in neko, php, cpp
var url : String
The url of this request. It is used only by the request() method and can be changed in order to send the same request to different target Urls.
function new(url : String) : Void

Creates a new Http instance with url as parameter.

This does not do a request until request() is called.

If url is null, the field url must be set to a value before making the call to request(), or the result is unspecified.

(Php) Https (SSL) connections are allowed only if the OpenSSL extension is enabled.

function customRequest(post : Bool, api : haxe.io.Output, ?sock : haxe.AbstractSocket, ?method : String) : Void
Available in neko, php, cpp
function fileTransfert(argname : String, filename : String, file : haxe.io.Input, size : Int) : Void
Available in neko, php, cpp
dynamic function onData(data : String) : Void
dynamic function onError(msg : String) : Void
dynamic function onStatus(status : Int) : Void
function request(?post : Bool) : Void
function setHeader(header : String, value : String) : Http
function setParameter(param : String, value : String) : Http
function setPostData(data : String) : Http
Available in neko, js, flash, php, cpp
static var PROXY : { port : Int, host : String, auth : { user : String, pass : String}}
Available in neko, php, cpp
static function requestUrl(url : String) : String
Available in neko, js, php, cpp
Back | Index