HttpDiagnosticsHeaders
final class HttpDiagnosticsHeaders (View source)
Exposes a completed summary through headers without reading or replacing the response body.
Methods
__construct(HttpDiagnosticsConfig $config)
Uses only the explicit exposure policy, with no dependency on application environment.
apply(ResponseInterface $response, HttpMetrics $metrics)
Returns the exact response when disabled and changes only four diagnostic headers when enabled.
ResponseInterface
Details
__construct
__construct(HttpDiagnosticsConfig $config)
Uses only the explicit exposure policy, with no dependency on application environment.
apply
ResponseInterface
apply(ResponseInterface $response, HttpMetrics $metrics)
Returns the exact response when disabled and changes only four diagnostic headers when enabled.
Existing body metadata and stream state are preserved, including for HEAD and streamed responses.