0.1.1 • Published 11 years ago

url-status v0.1.1

Weekly downloads
6
License
MIT
Repository
github
Last release
11 years ago

url-status NPM Version wercker continuous integration testing npm dependencies

Returns the status of an HTTP get request.

Install

npm install url-status --save

Usage

var urlStatus = require('url-status')

urlStatus('http://httpbin.org/get', function(status){
  console.log(status)
  // { code: 200, message: 'OK', type: 'Online' }
})

urlStatus('http://notarealdomain35252.org/', function(status){
  console.log(status)
  // { code: false, message: false, type: 'Offline' }
})

urlStatus('http://httpbin.org/404', function(status){
  console.log(status)
  // { code: 404, message: 'Not Found', type: 'Error' }
})

Todos

  • Add error descriptions
  • Complete testing

Contributing

Forks and pull requests are most welcomed.

Please run npm test before sending a pull request.

MIT license

Copyright (c) 2014, Montana Flynn (http://anonfunction.com/)

0.1.1

11 years ago

0.1.0

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago