Why `POST` and `DELETE` request call `OPTIONS`?
See original GitHub issueI’m trying to do DELETE
or POST
request to some singleton rest object, and the result is that it actually calling OPTIONS
instead(which failed, because I have no such a method in my API)…
$scope.$$event=API.one('events', id);
$scope.$$rsvp = $scope.$$event.one("rsvp");
//trying to request REMOVE action to /events/:id/rsvp
$scope.$$rsvp.remove();
How can I pass it?
Issue Analytics
- State:
- Created 10 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Why is my browser sending an OPTIONS HTTP request ...
As you can see, the POST method is never sent and only a method called OPTIONS is sent to the endpoint. The response...
Read more >Difference between PUT and DELETE request in Vanilla ...
PUT Request, DELETE Request ; It is used to Create or Modify a resource. It is used to delete a resource identified by...
Read more >Why is an OPTIONS request sent and can I disable it?
Options request is a preflight request when you send (post) any data to another domain. It's a browser security issue. But we can...
Read more >HTTP request methods - MDN Web Docs
Chrome Edge
CONNECT Full support. ChromeYes. Toggle history Full support. Edge12. Toggle history
DELETE Full support. ChromeYes. Toggle history Full support. Edge12. Toggle history
GET Full...
Read more >HTTP/1.1: Method Definitions
These methods ought to be considered "safe". This allows user agents to represent other methods, such as POST, PUT and DELETE, in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That depends on you backend for example with apache server you can do something like this in .htaccess file:
add more headers if you use something more then thease and everything should work.
I got this issue. i am using codeigniter in backend api but still not fixed. Tell me proper solution for this.