Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

https-proxy-agent

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

https-proxy-agent

An HTTP(s) proxy `http.Agent` implementation for HTTPS

  • 7.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
67M
decreased by-10.39%
Maintainers
0
Weekly downloads
 
Created

What is https-proxy-agent?

The https-proxy-agent package is a Node.js module that provides an http.Agent implementation that connects to a specified HTTP or HTTPS proxy server, and can be used with the http or https modules to make requests. It is particularly useful for making requests from behind a corporate firewall or when you need to use a proxy for requests for any other reason.

What are https-proxy-agent's main functionalities?

Creating an HTTPS proxy agent

This code sample demonstrates how to create an HTTPS proxy agent using the https-proxy-agent package and use it to make an HTTPS request.

const HttpsProxyAgent = require('https-proxy-agent');
const https = require('https');

const proxy = 'http://proxy-server:port';
const agent = new HttpsProxyAgent(proxy);

https.get({
  hostname: 'encrypted.google.com',
  path: '/',
  agent: agent
}, (res) => {
  console.log(`Got response: ${res.statusCode}`);
  // consume response body
  res.resume();
}).on('error', (e) => {
  console.error(`Got error: ${e.message}`);
});

Other packages similar to https-proxy-agent

Keywords

FAQs

Package last updated on 28 Jun 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc