http-or-https
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

http-or-https

Automatically use the http or https function appropriate to the given parameter.

Supports:

Example

import { get } from 'http-or-https';
 
get('https://example.com', (response) => {
    /* ... */
});
 
get('http://example.com', (response) => {
    /* ... */
});

Installation

http-or-https is authored as an ESM module, and therefore requires Node 12.0 or newer.

Install using NPM or Yarn:

npm install http-or-https
yarn add http-or-https

License

Copyright 2020 Andrew Duthie

Released under the MIT License. See LICENSE.md.

Readme

Keywords

Package Sidebar

Install

npm i http-or-https

Weekly Downloads

91

Version

1.0.2

License

MIT

Unpacked Size

5.74 kB

Total Files

6

Last publish

Collaborators

  • aduth