Sha256: 5b6f2d71d5ba4a00f9f667dabdc4fb07c4ee13fad9053cbaf62e99b67a7e4b46
Contents?: true
Size: 737 Bytes
Versions: 33
Compression:
Stored size: 737 Bytes
Contents
var proxy = require('./proxy'), userAgent = require('./useragent'); /** * The options passed to request when downloading the bibary * * There some nuance to how request handles options. Specifically * we've been caught by their usage of `hasOwnProperty` rather than * falsey checks. By moving the options generation into a util helper * we can test for regressions. * * @return {Object} an options object for request * @api private */ module.exports = function() { var options = { rejectUnauthorized: false, timeout: 60000, headers: { 'User-Agent': userAgent(), }, encoding: null, }; var proxyConfig = proxy(); if (proxyConfig) { options.proxy = proxyConfig; } return options; };
Version data entries
33 entries across 31 versions & 12 rubygems