Node receive post json from axios post

对着背影说爱祢 提交于 2021-01-29 02:05:30

问题


I have 2 different url, the first one receive a form action from an html page with the data and make a post request to the second url. This receive the json and with express make a get request with this json.

How can I read a json that I receive from another url with post request made with axios?

Thanks


回答1:


Usually, Axios response returns an object containing data;

const {data: json} = await axios.post(/*details*/);
console.log(json);


来源:https://stackoverflow.com/questions/57656728/node-receive-post-json-from-axios-post

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!