Problems with axios on Windows (IE 11)
See original GitHub issueHi
I’m trying to figure out why axios isn’t working on Windows (Internet Explorer 11).
When I try to make a post or get request it sends the data just fine but returns an syntax error in .catch():
My call:
axios.post(API_URL, {
some: data
}).then(function(response) {
console.log('Yaaaay:', response);
}).catch(function(response) {
console.log('Noooo :(', response)
});
The response in catch():
{ [functions]: , __proto__: { },
ABORT_ERR: 20,
code: 12,
constructor: { },
DATA_CLONE_ERR: 25,
DOMSTRING_SIZE_ERR: 2,
HIERARCHY_REQUEST_ERR: 3,
INDEX_SIZE_ERR: 1,
INUSE_ATTRIBUTE_ERR: 10,
INVALID_ACCESS_ERR: 15,
INVALID_CHARACTER_ERR: 5,
INVALID_MODIFICATION_ERR: 13,
INVALID_NODE_TYPE_ERR: 24,
INVALID_STATE_ERR: 11,
message: "SyntaxError",
name: "SyntaxError",
NAMESPACE_ERR: 14,
NETWORK_ERR: 19,
NO_DATA_ALLOWED_ERR: 6,
NO_MODIFICATION_ALLOWED_ERR: 7,
NOT_FOUND_ERR: 8,
NOT_SUPPORTED_ERR: 9,
PARSE_ERR: 81,
QUOTA_EXCEEDED_ERR: 22,
SECURITY_ERR: 18,
SERIALIZE_ERR: 82,
SYNTAX_ERR: 12,
TIMEOUT_ERR: 23,
TYPE_MISMATCH_ERR: 17,
URL_MISMATCH_ERR: 21,
VALIDATION_ERR: 16,
WRONG_DOCUMENT_ERR: 4
}
I’m not sure what to read of this.
The code works perfect in all other browsers on Windows/Mac.
I thought it might be a polyfill problem, so I included the es6-polyfill to my bundle but still no success.
Any suggestions?
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
axios IE promise doesn't work - Stack Overflow
I have problem with IE. IE return error about Promise. IE doesn't know anything about Promise. I am writing react/redux but I tried...
Read more >Microsoft pulls plug on Internet Explorer today after 27 years
Microsoft announced last year that they would be retiring the browser today and shift their focus to Microsoft Edge.
Read more >axios - npm
Promise based HTTP client for the browser and node.js. Latest version: 1.2.1, last published: 22 days ago. Start using axios in your project ......
Read more >Manage npm packages - Visual Studio (Windows)
Visual Studio helps you to manage packages using the Node.js package manager (npm)
Read more >Axios vs. fetch(): Which is best for making HTTP requests?
One of the main selling points of Axios is its wide browser support. Even old browsers like IE11 can run Axios without any...
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
at Client Side, can set headers for request: - axios.defaults.headers.get[‘Pragma’] = ‘no-cache’; - axios.defaults.headers.get[‘Cache-Control’] = ‘no-cache, no-store’; at Server Side, set headers for response: - https://www.npmjs.com/package/nocache
Disabling cache on the client side was enough to fix my problems. @anhvoduy Thanks!