包详细信息

popsicle-proxy-agent

blakeembrey128.6kApache-2.0不推荐使用3.0.0

Use agent option with popsicle directly

Enable proxy support for Popsicle (for node)

popsicle, proxy, agent, http

自述文件

Popsicle Proxy Agent

NPM version NPM downloads Build status Test coverage

Generic proxy agent (for Popsicle and node.js).

Installation

npm install popsicle-proxy-agent --save

Usage

var popsicle = require('popsicle')
var createProxy = require('popsicle-proxy-agent')

var proxy = createProxy({
  proxy: '...'
})

popsicle.get({
  url: 'http://example.com',
  transport: popsicle.createTransport({
    agent: proxy('http://example.com')
  })
})

Options

  • proxy The default HTTP(s) proxy to use
  • httpProxy The proxy for HTTP requests (default: process.env.HTTP_PROXY)
  • httpsProxy The proxy for HTTPS requests (default: process.env.HTTPS_PROXY)
  • noProxy A string of space-separated hosts to not proxy (default: process.env.NO_PROXY)

License

Apache 2.0