search

Home  >  Q&A  >  body text

angular.js - Iphone5s, Android5.0 and winPhone do not support HTTP PUT DELETE requests?

WeChat Development

Based on the RESTful API method, when making the PUT DELETE request, it was found that the browser did not support these two requests, so I tested on safari, tested on the system browser that comes with Android, and tested on winPhone and found that they are not supported. With these two request methods, how to handle PUT DELETE requests based on RESTful API during mobile web development?

某草草某草草2793 days ago649

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座2017-05-15 16:55:19

    $.ajax({
      url: "http://localhost:10320/api/Person/4",
      type: "POST",
      data: JSON.stringify(whatever),
      headers: { 
          "Content-Type": "application/json",
          "X-HTTP-Method-Override": "PUT" }, //PUT,DELETE
    })
    
    

    reply
    0
  • Cancelreply