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 aString(only available onsystargets) - create a
new haxe.Http(url), register your callbacks foronData,onErrorandonStatus, then callrequest().
Constructor
new(url:String)
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.
Variables
Methods
dynamiconBytes(data:Bytes):Void
This method is called upon a successful request, with data containing
the result String.
The intended usage is to bind it to a custom function:
httpInstance.onBytes = function(data) { // handle result }
dynamiconData(data:String):Void
This method is called upon a successful request, with data containing
the result String.
The intended usage is to bind it to a custom function:
httpInstance.onData = function(data) { // handle result }