Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
584 views
in Technique[技术] by (71.8m points)

node.js 的request-promise模块怎么发送带参数的POST请求啊

var rp = require('request-promise');
var options= {
        method:'post',
        uri:"http://192.168.0.37:8084/comments/praise",
        qs:{id:id},
        headers:{
            'User-Agent': 'Request-Promise'
        },
        json: true
    };
    rp(options).then(function(data){
        console.log(data)
    });

报错了,麻烦大神看下


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...