New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apistatus

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apistatus

Returns the status of an HTTP request.

0.1.2
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

API Status Travis CI License

API status is a simple tool that checks if an API is online.

API Status API Status API Status API Status API Status

Install

npm install apistatus

Usage

var apistatus = require('apistatus')

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

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

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

Wishlist

  • optional HAR object for the requests to use for full API coverage beyond simple GET requests
  • optional HAR object for the response to check against, essentially automated API testing
  • a website with logs of status changes and support for periodic checking of saved APIs

Contributing

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

MIT license

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

Keywords

url

FAQs

Package last updated on 28 Mar 2015

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