See every API call your Python script makes
If you want a Charles proxy alternative for a Python script, pass proxies={'https': 'http://127.0.0.1:8080'} and verify=False to requests. Every call goes through Buggregator's HTTP proxy, and the UI shows the request, the response, the status code and the response time. Use it in development only: TLS verification is off.
Steps
1. Start Buggregator with the proxy port
The proxy listens on port 8080 by default; the UI is on port 8000. In Docker Compose, expose both ports.
services:
buggregator:
image: ghcr.io/buggregator/server:latest
ports:
- "8000:8000" # UI + API
- "8080:8080" # HTTP Proxy2. Send requests through the proxy
Add proxies and verify=False to the call. In Docker Compose, replace 127.0.0.1 with the Buggregator service name, for example buggregator.
import requests
response = requests.get(
'https://api.example.com/users',
proxies={'https': 'http://127.0.0.1:8080'},
verify=False,
)3. Read the request and response
Open http://127.0.0.1:8000. Proxied calls carry a purple proxy badge. The detail page has Response, Request and Raw tabs, a JSON tree for the response body, and a color-coded status code.
Why it works
For HTTPS, the proxy answers the CONNECT handshake with a certificate for the target host, signed by a CA it keeps in memory, then forwards the request to the real server. Your client skips certificate verification, so no CA installation is needed. The CA is created at startup and never written to disk.
Related tips
- HTTP
See every API call your Laravel app sends
Set global proxy options for Laravel's HTTP client in AppServiceProvider. Every Http:: request and response shows up in Buggregator. Local only.
- HTTP
See a webhook's payload before you write the handler
Point the webhook URL at Buggregator with http-dump in the URL. See the headers, body and files it sends, plus a cURL command to send it again.
- HTTP
Send a captured request again with one cURL
Every request Buggregator captures comes with a ready cURL command. Copy it, paste it in a terminal, and the same request arrives again.
Checked on with Buggregator v2.8.0