I have a json string being printed using Lib.print(string);
in haxe/php and am hosting that on my localhost
I've checked http://localhost/index.php, and it does indeed print the json object as text.
My HTML5 app has the following code in it
var h = new HttpJs('http://localhost/index.php');
function traceFunc (d:String){trace(d); }
h.onData = traceFunc;
h.onError = traceFunc;
This has yet to come back with an onData
response (or onError
for that matter). I know I have to be missing something simple.
It seems like you forgot to actually invoke the request?
h.request(false);
(using false
for the post
argument to make sure it's a GET
instead of a POST
request)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With