npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

http-code-simulator

v1.0.0

Published

HTTP Code Simulator is a HTTP response code simulator server. One can test various HTTP response codes from the server on the client side using this simulator

Downloads

7

Readme

http-code-simulator

Travis CI Status

Build Status Coverage Status

http-code-simulator

  • http-code-simulator is a HTTP response code simulator server. One can test various HTTP response codes from the server on the client side using this simulator with an optional server side processing time.

Install the simulator

  1. Clone this repository http-code-simulator
  2. Switch to folder http-code-simulator
  3. Install dependencies: npm install
  4. Start the server: npm start Or node ./src/index.js --startServer
  5. Simulator will be running @ <localhost>:<9090>

Usage (client side)

  1. Send client HTTP requests (any HTTP Method) to <localhost>:<9090>/status/<HTTPCode>
  2. Simulate server side delay with <localhost>:<9090>/status/<HTTPCode>?sleep=<Miliseconds>

Test

  1. Execute test run npm test

HTTP Status codes


'200': { description:  "OK" },
'201': { description:  "Created" },
'202': { description:  "Accepted" },
'203': { description:  "Non-Authoritative Information" },
'204': { description:  "No Content" },
'205': { description:  "Reset Content" },
'206': { description:  "Partial Content" },
'300': { description:  "Multiple Choices" },
'301': { description:  "Moved Permanently" },
'302': { description:  "Found" },
'303': { description:  "See Other" },
'304': { description:  "Not Modified" },
'305': { description:  "Use Proxy" },
'306': { description:  "Unused" },
'307': { description:  "Temporary Redirect" },
'308': { description:  "Permanent Redirect" },
'400': { description:  "Bad Request" },
'401': { description:  "Unauthorized" },
'402': { description:  "Payment Required" },
'403': { description:  "Forbidden" },
'404': { description:  "Not Found" },
'405': { description:  "Method Not Allowed" },
'406': { description:  "Not Acceptable" },
'407': { description:  "Proxy Authentication Required" },
'408': { description:  "Request Timeout" },
'409': { description:  "Conflict" },
'410': { description:  "Gone" },
'411': { description:  "Length Required" },
'412': { description:  "Precondition Failed" },
'413': { description:  "Request Entry Too Large" },
'414': { description:  "Request-URI Too Long" },
'415': { description:  "Unsupported Media Type" },
'416': { description:  "Requested Range Not Satisfiable" },
'417': { description:  "Expectation Failed" },
'418': { description:  "I'm a teapot" },
'422': { description:  "Unprocessable Entity" },
'428': { description:  "Precondition Required" },
'429': { description:  "Too Many Requests" },
'431': { description:  "Request Header Fields Too Large" },
'451': { description:  "Unavailable For Legal Reasons" },
'500': { description:  "Internal Server Error" },
'501': { description:  "Not Implemented" },
'502': { description:  "ad Gateway" },
'503': { description:  "Service Unavailable" },
'504': { description:  "Gateway Timeout" },
'505': { description:  "HTTP Version Not Supported" },
'511': { description:  "Network Authentication Required" },
'520': { description:  "Web server is returning an unknown error" },
'522': { description:  "Connection timed out" },
'524': { description:  "A timeout occurred" },