node.js 如何为此节点请求模块启用详细日志?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21107160/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 16:39:01 来源:igfitidea点击:
How to enable verbose log for this node request module?
提问by Somnath
How to enable verbose log for the following node request module?
如何为以下节点请求模块启用详细日志?
https://github.com/mikeal/request
https://github.com/mikeal/request
var reqParam = {
'headers': {
'User-Agent': 'CLA'
},
'body': 'CSCCDDSADADDADADADAAAEE',
'strictSSL': true,
'jar': false,
'encoding': null,
'timeout': 300000
};
request.post(reqParam, function (err, res, body) {
if (err) {
console.log('Curl request received an error:' + err);
}
console.log(body);
};
What is the option which will enable http VERBOSE log for the https://github.com/mikeal/requestmodule ??
为https://github.com/mikeal/request模块启用 http VERBOSE 日志的选项是什么?
回答by cyberwombat
Do you mean debug?
你的意思是调试?
NODE_DEBUG=request node yourscript.js

