Debugging API Traffic
Inspectr helps you inspect, trace, and debug API requests and responses in real time. Whether you’re working on a backend service or testing an integration, Inspectr gives you the visibility you need.
Step 1: Start Your Backend Service
Section titled “Step 1: Start Your Backend Service”Ensure your API service is running locally. For example, a backend on port 3000
:
npm run dev# orpython app.py
Step 2: Start Inspectr as a Proxy
Section titled “Step 2: Start Inspectr as a Proxy”Use the --backend
flag to forward requests from Inspectr to your backend:
inspectr --listen=:8080 --backend=http://localhost:3000
-
Inspectr listens on port
8080
. -
Incoming requests will be forwarded to
localhost:3000
. -
All requests/responses will be captured and shown in:
-
Console log (color-coded summary)
-
UI App (http://localhost:4004)
Step 3: Send Requests
Section titled “Step 3: Send Requests”Send requests to your backend through Inspectr:
curl http://localhost:8080/api/users
Or update your frontend/API client to target http://localhost:8080
instead of the original backend.
Step 4: Explore in the UI
Section titled “Step 4: Explore in the UI”Visit http://localhost:4004 to:
- Inspect the request method, path, headers, body
- View the forwarded backend response
- Filter by status code, method, endpoint
- Replay past requests for regression testing
Debugging Tips
Section titled “Debugging Tips”Use Inspectr to debug:
- 4xx/5xx responses with full request visibility
- Misconfigured headers or missing tokens
- Wrong HTTP methods or paths
- Combine with browser dev tools or API clients (Postman, Insomnia)