JSPM

node-fetch-with-proxy

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1043
  • Score
    100M100P100Q151458F
  • License MIT

node-fetch with proxy-agent

Package Exports

  • node-fetch-with-proxy

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-fetch-with-proxy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-fetch-with-proxy

Thin wrapper of node-fetch that can be used behind the proxy.

The proxy specified by the environment variable (HTTP_PROXY, https_proxy, etc.) is used in Node.js environment.

Install

$ npm install node-fetch-with-proxy

Usage

See node-fetch

Advanced Usage

You can explicitly specify proxy options with the 3rd argument of fetch API.

const proxyUrl = 'http://your.proxy:port';

fetch('https://httpbin.org/post', {
  method: 'POST',
  body: 'foo=bar'
}, proxyUrl);