# http-https

> A wrapper that chooses http or https for requests

Latest version **1.0.0** (published 2014-01-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install http-https
pnpm add http-https
yarn add http-https
bun add http-https
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-01-02 |
| First published | 2014-01-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Isaac Z. Schlueter |
| Maintainers | isaacs |

## Links

- npm: https://www.npmjs.com/package/http-https
- Repository: https://github.com/isaacs/http-https
- Issues: https://github.com/isaacs/http-https/issues
- npm.io page: https://npm.io/package/http-https

## Recent versions

- 1.0.0 (latest) — 2014-01-02

## README

# http-https

A wrapper that chooses http or https for requests

## USAGE

```javascript
var hh = require('http-https')

var req = hh.request('http://example.com/bar')
var secureReq = hh.request('https://secure.example.com/foo')

// or with a parsed object...
var opt = url.parse(someUrlMaybeHttpMaybeHttps)
opt.headers = {
  'user-agent': 'flergy mc flerg'
}
opt.method = 'HEAD'
var req = hh.request(opt, function (res) {
  console.log('got response!', res.statusCode, res.headers)
})
req.end()
```

---
_Source: https://npm.io/package/http-https · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
