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 🙏

© 2026 – Pkg Stats / Ryan Hefner

http-reqtrace

v1.0.9

Published

A simple NodeJS application to view HTTP request details.

Readme

npm version license downloads docker-image-version docker-image-size docker-pulls

http-reqtrace

Description

The application starts a Web server which logs details of all incoming HTTP requests such as:

  • HTTP Method & URL
  • Query params
  • Headers
  • Body

The application accepts all HTTP methods and URIs. The routing is defined like this:

  • /status/:statusCode : return an HTTP response with status code statusCode and body {"message":"OK|KO"}
  • /**/* : return an HTTP response with status code 200 OK and body {"message":"OK"}
  • /metrics : return Prometheus metrics regarding HTTP requests

Following query parameters are also supported:

  • ?latencyInMs=60000 : wait for the given period in milliseconds before responding.

This service can be used to :

  • See very quickly what are the requests received and inspect their content.
  • Have a quick way to simulate specific cases with particular HTTP response codes.

How to use

Starts the service

  • Run container as root:
$ docker run -ti --name http-reqtrace -p 80:80 julb/http-reqtrace:latest
  • Run container as non-root:
$ docker run -ti --name http-reqtrace -p 80:8080 -e PORT=8080 -u 65534:65534 julb/http-reqtrace:latest

Note: the PORT environment variable can be set to customize listening port.

Request the service with any method, URI and parameters

$ curl http://localhost/context/uri?param1=value1&param2=value2 -H "Authorization: Bearer jwt"
{"statusCode": 200,"message":"OK"}
http > [ GET ] HTTP/ 1.1   http://localhost/context/uri?param1=value1&param2=value2
http >>     Header :  host : localhost
http >>     Header :  user-agent : curl/7.54.0
http >>     Header :  accept : */*
http >>     Header :  authorization : Bearer jwt
http >>     Query  :  { param1: 'value1', param2: 'value2' }
http >>     Body   :  {}
http < [ HTTP 200 ]

Getting specific HTTP responses status codes

$ curl http://localhost/status/404 -H "Authorization: Bearer jwt"
{"statusCode":404,"message":"KO"}

$ curl http://localhost/status/500 -H "Authorization: Bearer jwt"
{"statusCode":500,"message":"KO"}
http > [ GET ] HTTP/ 1.1   http://localhost/status/404
http >>     Header :  host : localhost
http >>     Header :  user-agent : curl/7.54.0
http >>     Header :  accept : */*
http >>     Header :  authorization : Bearer jwt
http >>     Query  : {}
http >>     Body   : {}
http < [ HTTP 404 ]
http > [ GET ] HTTP/ 1.1   http://localhost/status/500
http >>     Header :  host : localhost
http >>     Header :  user-agent : curl/7.54.0
http >>     Header :  accept : */*
http >>     Header :  authorization : Bearer jwt
http >>     Query  : {}
http >>     Body   : {}
http < [ HTTP 500 ]

Simulate latency

$ curl http://localhost/status/504?latencyInMs=60000
{"statusCode":504,"message":"KO"}
http > [ GET ] HTTP/ 1.1   http://localhost/status/504
http >>     Header :  host : localhost
http >>     Header :  user-agent : curl/7.54.0
http >>     Header :  accept : */*
http >>     Query  : {}
http >>     Body   : {}
<60s waiting...>
http < [ HTTP 504 ]