Hacker News new | ask | show | jobs
by HoLyVieR 5411 days ago
It would make sense in theory, but in practice you can't make POST request to a JSONP API. So that's why you have to stick to GET request.
1 comments

You can make a cross domain POST with an IFRAME but would not get the response directly. Having to use parent.postMessage, the window.name hack or polling with JSONP depending on the browser. Possible then, but not so easy.
Those hacks don't work on all platform (iframe for mobile is a good example) and often require you to have very particular setting on both sites. The only way for JSONP to work well on everything is to use script tag injection which only allows you to do GET request.
This works well on iPhone and Android mobiles. And has the same level of particular settings as JSONP.