将https请求发送到Node js中的rest服务的步骤

将https请求发送到Node js中的rest服务的步骤,第1张

将https请求发送到Node js中的rest服务的步骤

最简单的方法是使用请求模块

request('https://example.com/url?a=b', function (error, response, body) {  if (!error && response.statusCode == 200) {    console.log(body);  }});


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5163688.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-18
下一篇2022-11-18

发表评论

登录后才能评论

评论列表(0条)

    保存