angular.js - Iphone5s, Android5.0 and winPhone do not support HTTP PUT DELETE requests?
某草草
某草草 2017-05-15 16:53:19
0
1
654

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?

某草草
某草草

reply all(1)
滿天的星座
$.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
})

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template