Using PUT/POST/DELETE with JSONP and jQuery
Posted
by
ryanzec
on Stack Overflow
See other posts from Stack Overflow
or by ryanzec
Published on 2011-03-17T21:28:34Z
Indexed on
2011/03/20
16:10 UTC
Read the original article
Hit count: 244
I am working on creating a RESTful API that supports cross-domain requests, JSON/JSONP support, and the main HTTP method (PUT/GET/POST/DELETE). Now while will be easy to accessing this API through server side code , it would nice to exposed it to javascript. From what I can tell, when doing a JSONP requests with jQuery, it only supports the GET method. Is there a way to do a JSONP request using POST/PUT/DELETE?
Ideally I would like a way to do this from within jQuery (through a plugin if the core does not support this), but I will take a plain javascript solution too. Any links to working code or how to code it would be helpful, thanks.
© Stack Overflow or respective owner