apistatus

0.3.0 • Public • Published

API Status Test Status Test Coverage License

API status is a simple tool to send API requests and retrieve standard response data.

Install

npm install apistatus

Usage

var apistatus = require('apistatus')
 
apistatus('http://mockbin.com/status/200', function(status){
  console.log(status)
  // { online: true, statusCode: 200, category: 'Success', message: 'OK' }
})
 
apistatus('http://mockbin.com/status/404', function(status){
  console.log(status)
  // { online: true, statusCode: 404, category: 'Client Error', message: 'Not Found' }
})
 
apistatus('http://notarealdomain35252.com/', function(status){
  console.log(status)
  // { online: false }
})
 
apistatus(require("har.json"), function(statuses){
  console.log(statuses)
  // [{ online: true, statusCode: 200, category: 'Success', message: 'OK' },...
})

Wishlist

  • optionally use the HAR response object to check against, essentially automated API testing

Contributing

Forks and pull requests are most welcomed. Please run npm test before sending a pull request.

MIT license

Copyright (c) 2015, Mashape (https://www.mashape.com/)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.01latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.01
0.2.40
0.2.20
0.2.10
0.2.00
0.1.20
0.1.10

Package Sidebar

Install

npm i apistatus

Weekly Downloads

1

Version

0.3.0

License

MIT

Last publish

Collaborators

  • montanaflynn