Working HTML5 HttpGet/Post that works?
Monkey Forums/Monkey Programming/Working HTML5 HttpGet/Post that works?
| ||
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? |
| ||
Just look at the httprequest example in Marks Bananas in the latest Monkey? |
| ||
Thanks for the pointer. Seems to work. |
| ||
html5 can't do 'cross domain' httprequests either, although it's apparently possible to configure servers to allow this. |
| ||
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. |