“NetworkError: 405 Method Not Allowed” on Google contact delete

◇◆丶佛笑我妖孽 提交于 2019-12-06 14:31:30
sufyan.shoaib

Please see my answer here .

Make use of the google client api for javascript.

You are experiencing something called CORSS (Cross-Origin XMLHttpRequest)

if you open chrome dev tools you will see that the browser ignored your 'delete' type and sent OPTIONS instead.

this is happening when you try to call a server from other origin, the browser will fire an extra request with data type OPTIONS to the server to know what is required in order to send your original delete post.
The problem is that the server is not allowing 'OPTIONS' method type. if you ask me, ill try to find proxy (jsonp) service for google contact . or an api

Please have a look here: https://developers.google.com/api-client-library/javascript/start/start-js

I think you should use their standard api for that.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!