5

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.

Gama11
  • 31,714
  • 9
  • 78
  • 100
John Doughty
  • 246
  • 1
  • 5

1 Answers1

4

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)

Gama11
  • 31,714
  • 9
  • 78
  • 100