Accessing HTTP Log
This guide explains how to use HTTP Log to inspect outgoing HTTP/HTTPS requests from your applications.
Overviewβ
HTTP Log is a development tool that intercepts and displays all outgoing HTTP/HTTPS requests made by your applications. This is extremely useful for debugging API calls, webhooks, and external service integrations.
Powered by mitmproxy, it provides a real-time web interface to monitor all outbound traffic.
Installing HTTP Log Serviceβ
First, install the httplog service:
dvs service install httplog
Once installed, the web interface is accessible at:
https://httplog.svc.dvs.sh
Enabling HTTP Log for an Applicationβ
HTTP logging must be enabled per application:
cd ~/projects/my-app
dvs httplog enable
This will:
- Configure the application to route HTTP traffic through the proxy
- Install the mitmproxy CA certificate for HTTPS interception
- Restart the application container
Disabling HTTP Logβ
To disable HTTP logging for an application:
dvs httplog disable
Viewing HTTP Trafficβ
Request Listβ
The mitmproxy web interface shows all intercepted requests:
- Request method (GET, POST, etc.)
- URL
- Response status code
- Response size
- Duration
Request Detailsβ
Click on any request to see:
- Full request headers
- Request body (for POST/PUT)
- Response headers
- Response body
- Timing information
Commands Referenceβ
| Command | Description |
|---|---|
dvs httplog enable | Enable HTTP logging for current app |
dvs httplog disable | Disable HTTP logging for current app |
dvs httplog status | Show HTTP logging status for current app |
dvs httplog list | List all apps with their HTTP logging status |
dvs httplog tail | Live tail HTTP traffic logs in terminal |
Use Casesβ
Debugging API Integrationsβ
When your application makes calls to external APIs (Stripe, PayPal, shipping providers, etc.), you can see:
- Exact request payload sent
- Response received
- Any errors or unexpected responses
Webhook Verificationβ
When testing webhooks, verify that your application sends the correct payload to external services.
Performance Analysisβ
Identify slow external API calls that might be affecting your application's performance.
Frontend + Backend Scenarioβ
If you have multiple applications (e.g., frontend and backend), you can enable HTTP logging only on the backend to reduce noise:
cd ~/projects/backend
dvs httplog enable
# Frontend remains without HTTP logging
cd ~/projects/frontend
# (no httplog enable needed)
Troubleshootingβ
Requests Not Appearingβ
If HTTP requests don't appear in the interface:
- Verify httplog service is running:
dvs status - Verify HTTP logging is enabled for your app:
dvs httplog status - Restart your application:
dvs restart
SSL Certificate Errorsβ
If your application reports SSL certificate errors when HTTP logging is enabled:
- Ensure the application container was restarted after enabling
- Check that the mitmproxy CA was properly installed
Service Unavailableβ
If the httplog service stops, applications with HTTP logging enabled will fail to make outbound requests. To fix:
dvs service start httplog
Or disable HTTP logging for affected apps:
dvs httplog disable
Next Stepsβ
- Learn how to access Mailpit for email testing
- Learn how to use phpMyAdmin for database management