Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
atomic77 authored Jan 14, 2021
1 parent 7d540a2 commit 346b444
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -60,7 +63,8 @@ OPTIONS:
-p, --port <port> Port to bind to [default: 8000]
-r, --req-limit <req-limit>
Maximum number of requests to keep in memory [default: 1000]
-s, --sqlite <sqlite>
Filename of sqlite database to use for persistence (EXPERIMENTAL)
-u, --user-templates-dir <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
Expand All @@ -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

0 comments on commit 346b444

Please sign in to comment.