From 346b4443d96a49f672dcf72246897af25e08fb51 Mon Sep 17 00:00:00 2001 From: Alex Tomic Date: Thu, 14 Jan 2021 08:47:50 -0500 Subject: [PATCH] Update README --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 70ce09f..0a83500 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A lightweight HTTP request sink inspired by the original [requestbin](https://gi It's as simple as: ```bash -$ ./reqsink +$ docker run -p 8000:8000 atomic77/reqsink:latest Total 1 templates loaded: "admin.html" Binding to interface "0.0.0.0:8000" @@ -24,6 +24,9 @@ curl -X POST -H "Content-Type: application/json" \ The `/admin` route provides a simple GUI showing the current tracked requests: ![Admin page](static/admin.png) + +If you don't want to use docker, a static binary is available for linux_amd64. Other platforms should work fine, so far I've tested armv7. + ## User-defined templates The default response to any request to is a terse "OK". If you want to customize the response for a given @@ -60,7 +63,8 @@ OPTIONS: -p, --port Port to bind to [default: 8000] -r, --req-limit Maximum number of requests to keep in memory [default: 1000] - + -s, --sqlite + Filename of sqlite database to use for persistence (EXPERIMENTAL) -u, --user-templates-dir User-defined templates directory. If you want to provide a custom response to a particular endpoint, you will need to also provide a JSON file mapping the template to @@ -70,7 +74,6 @@ OPTIONS: ## Limitations / TODO items -* Persistent storage of requests +* Make request store accessible from admin UI * Ability to export requests * User-defined templates cannot be used with the same route for more than one method (eg. `/robots.txt` can't have a different `GET` and `POST` response) -* Embed templates and JS content for admin page into binary to remove dependency on jsdelivr CDN \ No newline at end of file