See every API call your Laravel app sends
Instead of Guzzle debug output, send Laravel's HTTP client through Buggregator's proxy: call Http::globalOptions() with 'proxy' and 'verify' => false in AppServiceProvider, inside isLocal(). Every Http:: request then shows up in Buggregator with its response, status code and response time. TLS verification is off, so keep it to local development.
Steps
1. Make sure the proxy port is open
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. Set the proxy for all HTTP calls
Add this to AppServiceProvider. The isLocal() check keeps it out of production.
// app/Providers/AppServiceProvider.php
use Illuminate\Support\Facades\Http;
public function boot(): void
{
if ($this->app->isLocal()) {
Http::globalOptions([
'proxy' => env('BUGGREGATOR_PROXY_URL', 'http://127.0.0.1:8080'),
'verify' => false,
]);
}
}3. In Docker Compose, set the proxy URL
When the app runs in a container next to Buggregator, use the service name.
BUGGREGATOR_PROXY_URL=http://buggregator:80804. Or proxy one call only
To check a single request, set the options on that call.
use Illuminate\Support\Facades\Http;
$response = Http::withOptions([
'proxy' => 'http://127.0.0.1:8080',
'verify' => false,
])->get('https://api.example.com/users');5. Read the request and the response
Open http://127.0.0.1:8000. Each call shows the full URL, request and response headers and body, a color-coded status code and the response time in milliseconds. JSON bodies open as a tree.
Why it works
Laravel's HTTP client is built on Guzzle (Laravel docs), and globalOptions passes Guzzle options to every request. Buggregator's proxy forwards each request to the real API and records both directions. For HTTPS it signs certificates with a CA kept in memory, which is why the client must skip verification.
Related tips
- HTTP
See every API call your Python script makes
Route Python requests through Buggregator's HTTP proxy on port 8080. See each request and response with status code and timing. Dev 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.
- Mock server
A working mock API from your OpenAPI spec
Import an OpenAPI 3 spec into Buggregator. Every operation becomes a mock rule with the spec's example or fake data, served under /mock.
Checked on with Buggregator v2.8.0