question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Axios didn't post data

See original GitHub issue
axios.post('http://x.x.x.x' + url, { some: 'data' })
            .then(this.onRequestSuccessful)
            .catch(this.onRequestError);

I sniff that request send by axios then I see it didn’t have data and request method is option

attach : img_20180803_200917_520

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Talvcommented, Aug 5, 2018

Depends on what is the thing you’re doing… but there seems to be a way to disable CORS in Chromium (and perhaps Google Chrome too).

https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome https://addons.mozilla.org/pl/firefox/addon/cors-everywhere/

Running code in Node.js is also an option.

1reaction
Talvcommented, Aug 5, 2018

Not an issue in Axios. Assuming it was cross-site request, issued directly from the browser.

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

Read more comments on GitHub >

github_iconTop Results From Across the Web

axios doesn't send post data to the back-end - Stack Overflow
I'm new to react and.my problem is that i'm going to make a post request to my node back-end. using react-redux and axios....
Read more >
Unable to POST data in axios · Issue #1195 - GitHub
I am using this code to POST the data to Web API var param = { args: { myStringVal: '979251e4-6c9f-460d-ba32-1b6fe58ce8a3' } };. axios({...
Read more >
Understanding Axios POST requests - LogRocket Blog
Axios is an open source library that helps us send all these kinds of requests by providing a promised-based HTTP client method called...
Read more >
Axios vs. Fetch API – Which is Better For HTTP Requests?
Axios automatically stringifies data when sending JavaScript objects to the API using the POST method. When using fetch(), we have to use JSON....
Read more >
Meet BeReal, Gen Z's new favorite app - Axios
How it works: BeReal encourages users to send one post every day to ... but followers will be notified that they didn't post...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found