Minimal server that accepts any request to any endpoint and logs the HTTP method/verb, endpoint and body payload received.
The server always responds with a 200 OK response, and logs to the console the information about the request.
Navigate to the folder you wish to have the repo on.
Clone it:
git clone git@github.com:ceccon-t/catcher-server.gitEnter the cloned folder:
cd catcher-serverCreate virtual environment:
python3 -m venv envActivate it:
source env/bin/activatepip install -r requirements.txtUsing the default port (9999):
python server.pyOptionally, you can use a custom port:
PORT=8000 python server.pySimple GET request:
curl "http://localhost:9999/some/endpoint?a=b"POST with a payload:
curl -X POST "http://localhost:9999/api/v1/something?id=1" \
-H "Content-Type: application/json" \
-d '{"hello": "world"}'See LICENSE.
You are free to use this project without paying me anything.
But, if you do, you are morally obliged to go read The Catcher In The Rye.