why Axios send two request

Viewed 902

I need help with axios, I don't know why is sending two request here an image of chrome network in one post call

I'm using react, and when I send request the function only trigger once (I debugged and put console.logs and get one response) but in chrome network I got two request, with different headers and type. One have Authorization token, and the other don't have tokensuccess request and wrong request this is in one call and I don't know what is happening.

Thanks for your time!

1 Answers

Is it an OPTION request?. OPTION requests are used to check if your client has permission to make the desired request to the API.

The HTTP OPTIONS method requests permitted communication options for a given URL or server. A client can specify a URL with this method, or an asterisk (*) to refer to the entire server.

Related