A tool to record and play back raw http requests. Multiple requests over a single connection (Keep-Alive) are supported.
This module ships with a simple http-recorder command line tool that takes two optional arguments.
http-recorder $PORT $DIRECTORY
$PORT defaults to 8080 and
$DIRECTORY defaults to
Once started, http-recorder listens for incoming connections, and stores the
raw incoming http data in files named
id is an
integer starting at 1 that increments with each incoming request.
Alternatively, you can also use the module programatically.
var HttpRecorder = ;var recorder = HttpRecorder;recorder;recorder;
Once you have one or more recorded http requests, you can use the
for playing them back.
var HttpPlayer = HttpPlayer;var player = HttpPlayer;player;player;
Please note: The player is a very dumb http client. When calling
player.end(), it opens a single socket to the given port / host, and simply
pipes all files passed to
player.add() sequentially into it. You are
responsible for figuring out if the host supports Keep-Alive or not.
This module is useful if you are tasked to write a http payload parser (like [formidable]), and you want to start out by gathering a good set of test data that you can easily feed into your parser.
You may be able to do other things with it as well, but the module is not meant
for recording and replaying user interactions (as that would likely require
Host header for different environments).
http-recorder is licensed under the MIT license.