fast-head
Fetch http(s) headers and statusCode or error.
Install
npm install --save fast-head
# or, with yarn
yarn add fast-head
Usage
const fastHead = ;
API
fastHead(url, [timeout])
url
Type: string
timeout (optionnal)
Type: number
in ms
Default: 5000
See fastHead.defaultTimeout.
fastHead.defaultTimeout
Type: number
in ms
To obtain the value of the default timeout. Since there's a single fastHead
, it's best not to change this field. Want to contribute and make it read-only?
Contribute
Contributions are appreciated! Here are a few ideas to get you started:
- add http2 support
- add url.parse() support
- add new URL() support
- make fastHead.defaultTimeout read-only
License
AGPL-v3 © 2017 Robin Millette