Given an url resolve it as fast as possible
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.bumpedrc
.editorconfig
.gitattributes
.gitignore
.npmrc
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
package.json

README.md

reachable-url

Last version Build Status Coverage Status Dependency status Dev Dependencies Status NPM Status Donate

Given an url resolve it as fast as possible.

Given an URL, it will be resolved fastest as possible.

It will be performing different HTTP requests in parallel (GET, HEAD) and it will return the first response to respond.

Because of that, don't use this module for consume body because it not always be available.

Install

$ npm install reachable-url --save

Usage

;(async () => {
  const reachableUrl = require('reachable-url')
  const { url } = await reachableUrl('https://googe.com', { folloRedirects: false })
})()

API

reachableUrl(input, [options])

url

Required
Type: string

The target URL to be resolved.

options

Same as got#options

License

reachable-url © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats