I am trying to communicate with an API from my React application using Axios. I managed to get the GET request working, but now I need a POST one.
I need the body to
There many methods to send raw data with a post request. I personally like this one.
post
const url = "your url" const data = {key: value} const headers = { "Content-Type": "application/json" } axios.post(url, data, headers)