Socket
Socket
Sign inDemoInstall

node-fetch-with-proxy

Package Overview
Dependencies
67
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-fetch-with-proxy

node-fetch with proxy-agent


Version published
Weekly downloads
1.8K
increased by0.16%
Maintainers
1
Install size
4.22 MB
Created
Weekly downloads
 

Readme

Source

node-fetch-with-proxy

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

Install

npm install node-fetch-with-proxy

Usage

API is the same as node-fetch.

const fetch = require('node-fetch-with-proxy');

fetch('http://httpbin.org/get')
  .then(res => res.json())
  .then(json => console.log(json));

Unlike node-fetch, proxy can be set by environment variable.

export HTTP_PROXY=http://your.proxy:8888

Environment variables are only valid for Node.js. Note that the browser uses its own proxy settings instead.

Keywords

FAQs

Last updated on 13 Sep 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc