ClientRequestWatcher
class ClientRequestWatcher extends Watcher
Constants
| protected DEFAULT_REQUEST_SIZE_LIMIT |
|
Methods
Record a Guzzle request intercepted via AOP.
Determine whether to ignore this request based on its host.
Build the request data array for a completed transfer.
Build the request payload, using structured Hypervel data when available.
Format the structured payload from Hypervel's HTTP client.
Format multipart data for display.
Format the structured payload with size limit and parameter hiding.
Format a structured payload for entry storage.
Extract the payload from the raw PSR-7 request body.
Extract response data from the PSR-7 response.
Extract the payload from the PSR-7 response body.
Format the given headers.
Details
in
Watcher at line 18
__construct(array $options = [])
Create a new watcher instance.
at line 34
void
register(Application $app)
Register the watcher.
Interception is handled by GuzzleHttpClientAspect via AOP.
in
Watcher at line 41
protected array
hideParameters(array $data, array $hidden)
Hide the given parameters.
at line 41
mixed
recordRequest(ProceedingJoinPoint $proceedingJoinPoint)
Record a Guzzle request intercepted via AOP.
at line 135
protected bool
shouldIgnoreHost(string $host)
Determine whether to ignore this request based on its host.
at line 143
protected array
buildRequestData(RequestInterface $request, TransferStats $stats, array $options)
Build the request data array for a completed transfer.
at line 164
protected array|string
buildPayload(RequestInterface $request, array $options)
Build the request payload, using structured Hypervel data when available.
When the request originated from Hypervel's HTTP client, the caller's
structured payload is available in the hypervel_data Guzzle option.
Body replacements made later by before-sending callbacks do not rewrite
those original options, so this describes caller intent and may differ
from bytes replaced later in the handler stack. Raw and third-party
traffic is parsed from the PSR-7 body instead.
at line 176
protected array|string
structuredPayload(RequestInterface $request, array $data)
Format the structured payload from Hypervel's HTTP client.
at line 193
protected array
formatMultipartData(array $data)
Format multipart data for display.
at line 227
protected array|string
payload(array $payload)
Format the structured payload with size limit and parameter hiding.
at line 239
protected array|string
formatStructuredPayload(array $payload, array $hidden, int $sizeLimit)
Format a structured payload for entry storage.
at line 263
protected array|string
getRequestPayload(RequestInterface $request)
Extract the payload from the raw PSR-7 request body.
at line 333
protected array
getResponse(ResponseInterface $response)
Extract response data from the PSR-7 response.
at line 345
protected array|string
getResponsePayload(ResponseInterface $response)
Extract the payload from the PSR-7 response body.
at line 407
protected array
headers(array $headers)
Format the given headers.