“jquery.jsonp.js” GET works. What about POST PUT DELETE OPTIONS?

前端 未结 1 1678
渐次进展
渐次进展 2021-01-17 01:57

jsonp http methods besides GET (POST, PUT, OPTIONS, DELETE)

Using jquery built-in $.ajax method looks like this

$(document).ready(function() {
    $.         


        
相关标签:
1条回答
  • 2021-01-17 02:34

    JSON-P works by injecting a script tag into your document: it is not a traditional XHR request.

    So you can usually only perform GET requests. You can NOT perform PUT requests.

    More details in this write-up: http://johnnywey.wordpress.com/2012/05/20/jsonp-how-does-it-work/

    0 讨论(0)
提交回复
热议问题