Iphone5s Android5.0 winPhone 都不支持HTTP的 PUT DELETE 请求?


微信开发

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

restful http angularjs

CODSOPE 9 years, 5 months ago

 $.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
})

猫心哈狼君 answered 9 years, 5 months ago

Your Answer