Skip to content

appwrite/docker-requestcatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Docker RequestCatcher

Discord Docker Pulls Build Status Twitter Account Follow Appwrite on StackShare

The RequestCatcher docker container is used for capturing and debugging HTTP requests sent during app development. This container is based on the smarterdm/http-request-catcher docker image with Appwrite specific configuration settings. For a fresh installation of smarterdm/http-request-catcher image use the docker original image.

Getting Started

These instructions will cover usage information to help you run the Appwrite's RequestCatcher docker container.

Prerequisities

In order to run this container you'll need docker installed on the system.

Refer docs for general documentation and guides for using docker.

Usage

docker run appwrite/requestcatcher

API Endpoints

The RequestCatcher exposes the following endpoints:

Endpoint Method Description
/__last_request__ GET Returns the last captured request
/__all_requests__ GET Returns all captured requests (useful for parallel test runs)
/__find_request__ GET Find requests matching header/body values (see below)
/__clear__ POST, DELETE Clears all captured requests
/* Any Captures any request made to any path

Example: Get All Requests

curl http://localhost:5000/__all_requests__

Example: Find Specific Request

Find requests by header value:

curl "http://localhost:5000/__find_request__?header_X-Custom-Id=abc123"

Find requests by body content:

curl "http://localhost:5000/__find_request__?body=test-event"

Find requests by HTTP method:

curl "http://localhost:5000/__find_request__?method=POST"

Combine multiple filters:

curl "http://localhost:5000/__find_request__?method=POST&header_Content-Type=application/json"

Example: Clear Requests

curl -X POST http://localhost:5000/__clear__

Environment Variables

Variable Default Description
MAX_REQUEST_HISTORY 1000 Maximum number of requests to store in history. Older requests are automatically removed when this limit is exceeded.

This container also supports all environment variables supplied by the original smarterdm/http-request-catcher Docker image.

Build

docker build --tag appwrite/requestcatcher:1.1.0 .

docker push appwrite/requestcatcher:1.1.0

Multi-arch build (experimental using buildx):

docker buildx build --platform linux/amd64,linux/arm64/v8 --tag appwrite/requestcatcher:1.1.0 --push .

Find Us

Copyright and license

The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php

About

RequestCatcher for catching requests response during development

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7