7
44
299
中级会员
var buff = childProcess.execSync(` curl -L -X GET --compressed '${msg.url}' `); var data = buff.toString(); msg.payload = JSON.parse(data); return msg;
查看全部评分
使用道具 举报
76
1364
1万
元老级技术达人
gzip If the input is a compressed buffer it tries to decompress to a utf8 string. node-red-contrib-gzip : gzip
dscao 发表于 2023-4-20 17:16 这个高级呀,没用过child_process模块。 gzip 节点就可以解压http请求的结果
1975
5665
论坛元老
流水无味
本版积分规则 发表回复 回帖后跳转到最后一页
经常在论坛发帖,且发帖量较大
Archiver|手机版|小黑屋|Hassbian
GMT+8, 2024-5-9 09:51 , Processed in 0.106093 second(s), 30 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.