request 常规默认配置

2019-04-01  本文已影响0人  2359634711
var request = require('request')
var cJar = request.jar();
request = request.defaults({
    jar: cJar,
    strictSSL: false,
    rejectUnauthorized: false,
    followAllRedirects: true,
    headers: {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'
    }
})
上一篇 下一篇

猜你喜欢

热点阅读