HTTP Client Collector
Captures outgoing PSR-18 HTTP requests and responses with timing and status codes.

What It Captures
| Field | Description |
|---|---|
method | HTTP method (GET, POST, etc.) |
uri | Request URI |
headers | Request headers |
line | Source file and line of the HTTP call |
responseStatus | Response HTTP status code |
responseRaw | Raw response body |
totalTime | Total request/response time in seconds |
Data Schema
[
{
"startTime": 1711878000.100,
"endTime": 1711878000.350,
"totalTime": 0.25,
"method": "GET",
"uri": "https://api.example.com/users/42",
"headers": {"Authorization": "Bearer ***"},
"line": "/app/src/ApiClient.php:55",
"responseRaw": "{\"id\": 42, \"name\": \"John\"}",
"responseStatus": 200
}
]Summary (shown in debug entry list):
{
"http": {
"count": 3,
"totalTime": 0.75
}
}Contract
use AppDevPanel\Kernel\Collector\HttpClientCollector;
// Start collection
$collector->collect(
request: $psrRequest,
startTime: microtime(true),
line: '/app/src/ApiClient.php:55',
uniqueId: 'req-1',
);
// Complete with response
$collector->collectTotalTime(
response: $psrResponse,
endTime: microtime(true),
uniqueId: 'req-1',
);INFO
HttpClientCollectorAppDevPanel\Kernel\Collector\HttpClientCollectorCollects Http Client data during application lifecycle. implements SummaryCollectorInterfaceAppDevPanel\Kernel\Collector\SummaryCollectorInterfaceSummary data collector responsibility is to collect summary data for a collector. Summary is used to display a list of previous requests and select one to display full info. Its data set is specific to the list and is reduced compared to full data collected in {@see CollectorInterface}. and depends on TimelineCollectorAppDevPanel\Kernel\Collector\TimelineCollectorCollects Timeline data during application lifecycle..
How It Works
The collector is fed by HttpClientInterfaceProxyAppDevPanel\Kernel\Collector\HttpClientInterfaceProxyDecorator proxy for Http Client Interface. Intercepts calls and forwards data to collectors. — a PSR-18 ClientInterfacePsr\Http\Client\ClientInterfacePSR-18 HTTP Client Interface. Sends PSR-7 requests and returns PSR-7 responses. decorator. Every $client->sendRequest($request) call is automatically intercepted, timed, and recorded.
Debug Panel
- Request list — all outgoing HTTP calls with method, URL, status, and timing
- Request/response details — expandable view with headers and body
- Status badges — color-coded by response status (2xx green, 4xx orange, 5xx red)
- Timing breakdown — per-request duration