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

http-status-cli

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-status-cli

HTTP Status code message CLI lookup

latest
Source
npmnpm
Version
1.2.2
Version published
Maintainers
1
Created
Source

http-status-cli

Why

I always forget what some status codes are and what they do—therefore I find this tool handy to do a quick lookup.

Installation

npm install -g http-status-cli

or

npm install --save http-status-cli

Features

  • HTTP Status code message CLI lookup
  • Use it as a module in your project

Usage

http-status-418

or

var httpStatus = require('http-status-cli');

httpStatus(418, function(err, msg, desc) {
    if (err) {
        console.log(err);
    }

    console.log(msg, desc);
});

// Output:
I'm a teapot
This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, 
Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers. 
The RFC specifies this code should be returned by tea pots requested to brew coffee. This HTTP 
status is used as an easter egg in some websites, including Google.com.

Tests

npm test

Sources

  • https://www.addedbytes.com/articles/for-beginners/http-status-codes/
  • https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Contribution

Contributions are appreciated.

License

MIT-licensed. See LICENSE.

Keywords

http

FAQs

Package last updated on 30 Jan 2016

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