post method automatically changed to options ?
See original GitHub issue Vue.http.interceptors.push(function () {
return {
request: function (request) {
var tokenVal = sessionStorage.getItem("token");
if(tokenVal) {
request.beforeSend = function() {
request.headers['token'] = tokenVal
}
}
return request;
},
response: function (response) {
return response;
}
};
});
After the headers to add a token, post method previously used to automatically become options
Why?
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
POST Method got converted to OPTIONS automatically
Basically I am using a POST method but it automatically gets converted to OPTIONS method. I know browser does this but also read...
Read more >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.
Read more >When i send a post method it will change automatically into ...
When I send a post request it will change automatically into options. Here I have attached code for login module. login.ts
Read more >REST Post Method changed to GET automatically when...
When I Submit Request for POST method with empty or null parameters, then the request is submitted as GET method.
Read more >Cross-Origin Resource Sharing (CORS) - MDN Web Docs
An example of a cross-origin request: the front-end JavaScript code served from ... Access-Control-Allow-Methods: POST, GET, OPTIONS ...
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
@NicolasParada That’s right. #228
I am having an issue with not being able to save data into a database so I read about CORS and then installed it by following steps here: https://stackoverflow.com/questions/39429462/adding-access-control-allow-origin-header-response-in-laravel-5-3-passport
still not working?!