dance-engineer / guzzle-tracy
Debug panel for Guzzle connections
Installs: 132
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
Requires
- hannesvdvreken/guzzle-profiler: 1.0.0
- tracy/tracy: ^2.6
Requires (Dev)
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2023-05-18 05:36:29 UTC
README
A Tracy debug bar for Guzzle Connection
Example
<?php use DanceEngineer\GuzzleTracy\Panel; use GuzzleHttp\Client; use GuzzleHttp\Handler\CurlHandler; use GuzzleHttp\HandlerStack; use GuzzleHttp\Profiling\Middleware; use Tracy\Debugger; final class FitBitClientFactory { public static function create(): Client { $panel = new Panel(); $stack = new HandlerStack(); $stack->setHandler(new CurlHandler()); $stack->push(new Middleware($panel)); $debugBar = Debugger::getBar(); $debugBar->addPanel($panel, 'fitbit'); return new Client(['handler' => $stack]); } }