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.

How to post body JSON array with Axios?

See original GitHub issue

SO Far i only found how to post for json object, but how if my post body must like this :

{ "resource": [ { "login_id": "", "name": "", "username": "", "photo_url": "", "email": "" } ] }

anyone can help?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17

github_iconTop GitHub Comments

14reactions
TitanKingcommented, Oct 27, 2017

It would be nice if you could post your solution. Everyone helps you out, the least you can do is give back a little.

7reactions
programmermagercommented, Aug 11, 2017

its solved guys. thanks btw

Read more comments on GitHub >

github_iconTop Results From Across the Web

axios post array data - Stack Overflow
Doing it this way sent it the request as application/x-www-form-urlencoded, and the proper data in the body. Share.
Read more >
POST JSON with Axios - Mastering JS
If you pass a JavaScript object as the 2nd parameter to the axios.post() function, Axios will automatically serialize the object to JSON for ......
Read more >
Understanding Axios POST requests - LogRocket Blog
Learn how to use the Axios POST method in both vanilla JavaScript and in a framework like React to send requests.
Read more >
Sending POST JSON Requests With Axios - Stack Abuse
In this article, we will learn how to send POST JSON requests with Axios, and how to handle both previously serialized and unserialized...
Read more >
Sending Array Of Objects in GET request (axios) - Reddit
const response = await axios({ url: "/path/to", params: { page: 0, // … filters: [{name: 'first_name', value: 'Jack'}], }, paramsSerializer: ( ...
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