http-https-agent

Get either a HTTP or HTTPS agent depending on protocol

MIT 3 个版本
安装
npm install http-https-agent
yarn add http-https-agent
pnpm add http-https-agent
bun add http-https-agent
README

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

  • lodash.startswith: The lodash method _.startsWith exported as a module.

Dev Dependencies

License

MIT

Generated by package-json-to-readme

版本列表
1.0.2 2016-07-14
1.0.1 2016-07-14
1.0.0 2016-07-14