Working HTML5 HttpGet/Post that works?

Monkey Forums/Monkey Programming/Working HTML5 HttpGet/Post that works?

Beaker(Posted 2013) [#1]
I've tried MNet and XhrHttpHTML in HTML5 and I can't get either of them to work either locally or online. I even took a look at the code, which looks fine. Anybody got either working? Any pointers or other suggestions?


CopperCircle(Posted 2013) [#2]
Just look at the httprequest example in Marks Bananas in the latest Monkey?


Beaker(Posted 2013) [#3]
Thanks for the pointer. Seems to work.


marksibly(Posted 2013) [#4]
html5 can't do 'cross domain' httprequests either, although it's apparently possible to configure servers to allow this.


Karja(Posted 2013) [#5]
For cross domain requests, have a look at CORS:
http://en.wikipedia.org/wiki/Cross-origin_resource_sharing

What it boils down to is configuring the receiving web server to send e.g. the following HTTP headers:

Access-Control-Allow-Headers: origin, content-type, access-control-allow-origin
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 86400
Allow: GET, POST, OPTIONS

Most of the time, this is doable in for example PHP.