Daemon that records all incoming HTTP request and allow to fetch them and put expectations on them.
1.4K
Simple application that records all incoming HTTP requests and writes them down to a filesystem in a conventional directory structure. Intended to be used in tests.
Go to releases page and download binary for your platform. Linux and Mac OS X are supported.
Optionally put this binary on your path (or use absolute/relative path to run
it). All examples in usage section assume, that binary recorder is
available on the path.
go get toolIf you have properly configured Golang development environment, you can install
recorder via:
go get -u github.com/waterlink/recorder
dockerrecorder is available as an automated build from
docker hub.
It is recommended to use a runner script as a
recorder on your path. Assuming ~/bin is on your path:
curl -L https://github.com/waterlink/recorder/raw/master/dockerfiles/runner.sh > ~/bin/recorder
chmod a+x ~/bin/recorder
Then all examples from usage section should still work without modification.
recorder daemon
By default it uses port 9977 and binds to 0.0.0.0.
This can be changed by providing -l, --listen option, e.g.:
recorder daemon -l 127.0.0.1:3789 # or --listen=127.0.0.1:3789
recorder get POST /api/v2/user
Use -i, --index option for that:
recorder get -i 2 POST /api/v2/user # or --index=2
recorder reset
It is enough to send _TERMINATE request to a server:
curl -X_TERMINATE localhost:9977
This command may fail with curl: (52) Empty reply from server, which should
not be a problem, and typically should be ignored:
curl -X_TERMINATE localhost:9977 || true
recorder is POST /api/v2/user = "[email protected]&password=welcome"
is supports -i, --index option.
When expectation succeeds, is command returns exit code 0.
When expectation fails, is command returns exit code 1.
recorder is --json-path=user/email POST /api/v2/user = "[email protected]"
MIT license. Read here.
Content type
Image
Digest
Size
58 MB
Last updated
almost 11 years ago
docker pull waterlink/recorder