New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fast-head

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-head

Fetch http(s) headers and statusCode or error.

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created
Source

fast-head

Build Status Coverage Status Dependency Status

Fetch http(s) headers and statusCode or error.

Install

npm install --save fast-head
# or, with yarn
yarn add fast-head

Usage

const fastHead = require('fast-head');

fastHead('http://www.yamaska.ca/')
  .then(({ elapsed, headers, statusCode, error }) => {
    // either headers and status code are filled,
    // or it's error
  })
  .catch(console.error)

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:

License

AGPL-v3 © 2017 Robin Millette

Keywords

http

FAQs

Package last updated on 25 Sep 2017

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