accepts-https

1.0.0 • Public • Published

accepts-https

Description

Detects if a domain responds to HTTPS requests. Supports only port 443. Detects socket errors, connection reset and connection refused. Almost full test coverage.

Usage

// initialization
const config = {
    timeout: 1000 // default value
}
const acceptsHttps = require('accepts-https')(config);
 
await acceptsHttps('google.com');
// true
 
await acceptsHttps('localhost');
// false

License

MIT

/accepts-https/

    Package Sidebar

    Install

    npm i accepts-https

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    5.13 kB

    Total Files

    5

    Last publish

    Collaborators

    • edouarddemotes
    • dt-tractr