request-headers

1.0.0 • Public • Published

request-headers

Requests the headers of a URL and then aborts the request.

requestHeaders('https://foaas.herokuapp.com/you/finn/finn', function(err, statusCode, headers) {
  console.log('Content type: ' + headers['content-type']);
});

It is similar to the npm module curli, but curli uses the HEAD command, which might be a better idea. However am not sure how well implemented HEAD is across the web therefore I rather abort a GET.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    2
  • 0.0.1
    0

Package Sidebar

Install

npm i request-headers

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • finnpauls