{"action":"opened","issue":{"url":"https://api.github.com/repos/mzabriskie/axios/issues/527","repository_url":"https://api.github.com/repos/mzabriskie/axios","labels_url":"https://api.github.com/repos/mzabriskie/axios/issues/527/labels{/name}","comments_url":"https://api.github.com/repos/mzabriskie/axios/issues/527/comments","events_url":"https://api.github.com/repos/mzabriskie/axios/issues/527/events","html_url":"https://github.com/mzabriskie/axios/issues/527","id":187835272,"number":527,"title":"Basic auth with form data (react/redux)","user":{"login":"jabacchetta","id":12591890,"avatar_url":"https://avatars.githubusercontent.com/u/12591890?v=3","gravatar_id":"","url":"https://api.github.com/users/jabacchetta","html_url":"https://github.com/jabacchetta","followers_url":"https://api.github.com/users/jabacchetta/followers","following_url":"https://api.github.com/users/jabacchetta/following{/other_user}","gists_url":"https://api.github.com/users/jabacchetta/gists{/gist_id}","starred_url":"https://api.github.com/users/jabacchetta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jabacchetta/subscriptions","organizations_url":"https://api.github.com/users/jabacchetta/orgs","repos_url":"https://api.github.com/users/jabacchetta/repos","events_url":"https://api.github.com/users/jabacchetta/events{/privacy}","received_events_url":"https://api.github.com/users/jabacchetta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-07T21:34:00Z","updated_at":"2016-11-07T21:34:00Z","closed_at":null,"body":"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.\r\n\r\n[Here's a working example](https://gist.github.com/jabacchetta/542314feb01b5fe89447bba22172f9c5).\r\n\r\n![reqwest](https://cloud.githubusercontent.com/assets/12591890/20076041/69c2203e-a4fc-11e6-8528-aa7063a778d7.jpg)\r\n\r\nI tried duplicating the request exactly (according to the network tab) using axios, and [this is what I came up with](https://gist.github.com/jabacchetta/899586e603764b0c0425552ccb18a0bc) (using a suggested transform workaround from one of the threads above):\r\n\r\n![transform](https://cloud.githubusercontent.com/assets/12591890/20076159/f614b632-a4fc-11e6-94df-285a5996f53d.jpg)\r\n\r\nFrom 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): \r\n\r\n>  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.\r\n\r\nI also tried [using params in the config](https://gist.github.com/jabacchetta/ce5e0f87d88a5d0ea0584c406e9cad0b) and received the exact same error.\r\n\r\nWhat am I doing wrong here?"}}
{"actor":{"display_login":"jabacchetta"}}