http-https-agent

1.0.2 • Public • Published

http-https-agent

Get either a HTTP or HTTPS agent depending on protocol

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install http-https-agent --save

Usage

/* eslint-disable no-unused-vars */
/* eslint-disable import/no-extraneous-dependencies */
import httpHttpsAgent from 'http-https-agent';

const getAgent = httpHttpsAgent({
  keepAlive: true
});

const httpsAgent = getAgent('https://google.com');
const httpAgent = getAgent('http://google.com');

Tests

npm install
npm test

Dependencies

Dev Dependencies

License

MIT

Generated by package-json-to-readme

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    2,974
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    2,974
  • 1.0.1
    2
  • 1.0.0
    2

Package Sidebar

Install

npm i http-https-agent

Weekly Downloads

920

Version

1.0.2

License

MIT

Last publish

Collaborators

  • kesla