如何为此节点请求模块启用详细日志? [英] How to enable verbose log for this node request module?

查看:23
本文介绍了如何为此节点请求模块启用详细日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为以下节点请求模块启用详细日志?

How to enable verbose log for the following node request module?

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);
  };

https://github.com/mikeal/request<启用http VERBOSE日志的选项是什么?/a> 模块 ??

What is the option which will enable http VERBOSE log for the https://github.com/mikeal/request module ??

推荐答案

你是说调试吗?

NODE_DEBUG=request node yourscript.js

这篇关于如何为此节点请求模块启用详细日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆