angular.js - Iphone5s Android5.0 winPhone 都不支持HTTP的 PUT DELETE 请求?
某草草
某草草 2017-05-15 16:53:19
0
1
604

微信开发

基于RESTful API的方式,在进行PUT DELETE请求时发现浏览器不支持这两个请求,于是在safari上测试,在Android自带的系统浏览器上面测试,和winPhone上测试发现均不支持这两个请求方式,请问在移动网页开发的时候如何处理基于RESTful API的PUT DELETE请求?

某草草
某草草

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!