joeirimpan / werkzeug-interceptor

How often do you find yourself writing flask apps just to mock that one third party HTTP endpoint to inspect the request? Well, this solves it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

werkzeug-interceptor

Werkzeug-Interceptor allows you to mock specific endpoints based on the HTTP method name, endpoint, and response you define.

Usage

http_intercept -p 8000 '[{"methods": ["POST"], "path": "test-endpoint", "response": "Hello"}]'
curl -X POST -H "X-Access-Key: some-random-key" http://localhost:8000/test-endpoint

Development

Manages the dependencies using Rye

cd werkzeug-interceptor
rye sync

License

This project is licensed under the MIT License.

About

How often do you find yourself writing flask apps just to mock that one third party HTTP endpoint to inspect the request? Well, this solves it.

License:MIT License


Languages

Language:Python 100.0%