Why are my post requests sended twice?
See original GitHub issueI send post request like:
Vue.http.post(url, {}, {params:data}).then(callback)
I make the second param in post method a empty object because I don’t want to send JSON data.
In chrome’s devtool, I record the network data, and I notice that there are two requests sended when I called post method. One of them has a ‘Request Method’ attribute whose value is ‘OPTIONS’.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10
Top Results From Across the Web
POST request strange behavior - request is sent tw...
The problem is that the 2nd request that Power Query is sending has identical headers as the 1st request, so the timestamp and...
Read more >Can an HTTPS request be sent twice?
If you're replaying an entire connection, that won't work because of the way the handshake occurs. Each new connection has sets of random...
Read more >AXIOS sending Request Twice - Laracasts
I send a POST request to a API server and the request sent 2 times. The initial request succeed because the records are...
Read more >Apache sending POST request twice - php - Super User
To diagnose it, set a global variable orderSent to false on page load, then before sending the POST /da/ordrer first check if it...
Read more >Post update send webhooks twice - WordPress.org
This happens due to Ajax. We added so far a filter that can limit the execution of the same action to one time...
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’s called a preflight request that allows the server to specify what is required for that request to be fulfilled.
It’s CORS related and is not an issue.
Is there any explanation for as to why the pre-flight request also registers as a normal request to the server and overall the process of sending a request to the server via Vue JS method registers as 2 requests on the server and a request sent via jQuery ajax or separately via Postman registers as 1 request?