A simple GUI tool to process HTTP requests written in Python + Qt.
Important notes:
- All UI files are designed using QtDesigner.
- All icon files are defined as SVG and edited using Inkscape.
To run the application, follow the steps bellow.
-
Create a Python virtual environment and activate it.
python3 -m venv venv/ source venv/bin/activate
-
Install the requirements.txt.
python3 -m pip install -r requirements.txt
If you want to install additional libraries for development, also install the libraries listed in requirements-dev.txt.
python3 -m pip install -r requirements-dev.txt
-
Finally, run the file hreq.py.
python3 hreq.py
This application also supports some command line arguments that pre-populate some of the GUI fields. To see all available options, run the help menu:
python3 hreq.py -h/--help
Example of command with some of the fields:
python3 hreq.py \
--url 'http://127.0.0.1:5000' \
--method 'POST' \
--content-type 'JSON' \
--body '{"test": "value"}' \
--headers '{"header1": "value1"}'
For development purposes, there is a small Flask web application that can be used to validate the HTTP requests. It can be found in the folder tests/flask-app/ and can be run with the following command:
flask --app tests/flask-app/app.py run
This will run a small webserver running locally. You can hit this endpoint at:
curl http://127.0.0.1:5000