Request Method: OPTIONS
See original GitHub issueI’m trying to make a POST request but I’m still sending OPTIONS as a ‘Request Method’.
Example:
import fetch from 'isomorphic-fetch'
fetch('http://localhost:3000/api/v1/sign_in', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: {
login: 'test'
}
})
In Chrome, I can see: Remote Address:127.0.0.1:3000 Request URL:http://localhost:3000/api/v1/sign_in Request Method:OPTIONS Status Code:404 Not Found
Thanks in advance.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:6
- Comments:13
Top Results From Across the Web
OPTIONS - HTTP - MDN Web Docs
The HTTP OPTIONS method requests permitted communication options for a given URL or server. A client can specify a URL with this method, ......
Read more >What is HTTP OPTIONS Method? - ReqBin
The HTTP OPTIONS method is used to describe communication options for the target resource. Browsers send an HTTP OPTIONS request to find out ......
Read more >Introduction to HTTP OPTIONS Method - Aaron Bos
At a high level, the OPTIONS method is used to determine the communication options available for a specific resource. This means that we...
Read more >HTTP/1.1: Method Definitions
The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the ...
Read more >What is HTTP method OPTIONS? - Medium
The HTTP OPTIONS method is a type of HTTP call that explains what are the options for a target resource such as API...
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
There is some wired think. When I remove line with:
it works.
So this is correct setup:
No OPTIONS request anymore.
Removing the
'Content-Type': 'application/json'
works… does anyone know why? Is it a bug, or is this expected?