is-http2
Simple module to check if certain servers out there support HTTP/2.
install
$ npm install --save is-http2
Pre-requisites
To make is-http2
work, you need to have openssl in a version greater than 1.0.0 installed and available in your $path
.
Basic usage
isHttp2( url, options )
Description : Check if server behind given url supports HTTP/2
url : Url to check HTTP/2 support for
Options
- includeSpdy : optional: should SPDY be considered HTTP/2
- openssl : optional: specify custom openssl command (i.e. '/usr/local/Cellar/openssl/1.0.2k/bin/openssl')
isHttp2
returns a Promise which will be resolved with an Object containing isHttp2
and supportedProtocols
.
const isHttp2 = ; ;