Package Exports
- http-or-https
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (http-or-https) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
http-or-https
Automatically use the http or https function appropriate to the given parameter.
Supports:
get(httpdocumentation,httpsdocumentation)request(httpdocumentation,httpsdocumentation)
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-httpsyarn add http-or-httpsLicense
Copyright 2020 Andrew Duthie
Released under the MIT License. See LICENSE.md.