节点从axios发布接收发布json

编程入门 行业动态 更新时间:2024-10-26 10:34:02
本文介绍了节点从axios发布接收发布json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有2个不同的url,第一个从html页面接收带有数据的表单动作,并向第二个url发出发布请求.这将接收json并通过express对此json进行get请求.

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.

我如何读取通过axios发出的带有发布请求的其他网址中接收到的json?

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

谢谢

推荐答案

通常,Axios响应返回一个包含 data ;

Usually, Axios response returns an object containing data;

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

更多推荐

节点从axios发布接收发布json

本文发布于:2023-11-24 18:58:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1626438.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:节点   axios   json

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!