🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

http-https

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-https

A wrapper that chooses http or https for requests

1.0.0
latest
npm
Version published
Weekly downloads
390K
-31.95%
Maintainers
1
Weekly downloads
 
Created
Source

http-https

A wrapper that chooses http or https for requests

USAGE

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()

FAQs

Package last updated on 02 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts