You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to replicate a working auth request with axios (currently implemented using reqwest). I've read through #167 and #97 and have gotten close, but still not quite there.
I tried duplicating the request exactly (according to the network tab) using axios, and this is what I came up with (using a suggested transform workaround from one of the threads above):
From the network tab, this solution appears to have worked for the request being manipulated, but the next Redux action (loadCurrentUser) that gets dispatched from that .then success fails, giving me the following error (which I did not get with the original reqwest solution):
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 401.
It doesn't look like you need to use that transform workaround. There are easier ways to convert a JavaScript object to the application/x-www-form-urlencoded format. Please see this comment.
I'm trying to replicate a working auth request with axios (currently implemented using reqwest). I've read through #167 and #97 and have gotten close, but still not quite there.
Here's a working example using reqwest.
I tried duplicating the request exactly (according to the network tab) using axios, and this is what I came up with (using a suggested transform workaround from one of the threads above):
From the network tab, this solution appears to have worked for the request being manipulated, but the next Redux action (loadCurrentUser) that gets dispatched from that .then success fails, giving me the following error (which I did not get with the original reqwest solution):
I also tried using params in the config and received the exact same error.
What am I doing wrong here?
The text was updated successfully, but these errors were encountered: