node red http 请求例子

函数2

var tk = msg.payload.access_token
msg.headers = {};
 
msg.headers['Authorization'] = "ABC"+tk;
msg.payload = {}
return msg;

  

函数1

msg.headers = {};
msg.headers['Content-Type'] = 'application/x-www-form-urlencoded';
msg.payload = {
    client_id: "111",
client_secret: "222",
grant_type: "333"
}
return msg;
posted @ 2024-03-15 11:18  ahuo  阅读(3)  评论(0编辑  收藏  举报