BodySummarizer example

// Client Error: `GET /` resulted in a `404 Not Found` response:         // <html> ... (truncated)         $message = \sprintf(
            '%s: `%s %s` resulted in a `%s %s` response',
            $label,
            $request->getMethod(),
            $uri->__toString(),
            $response->getStatusCode(),
            $response->getReasonPhrase()
        );

        $summary = ($bodySummarizer ?? new BodySummarizer())->summarize($response);

        if ($summary !== null) {
            $message .= ":\n{$summary}\n";
        }

        return new $className($message$request$response$previous$handlerContext);
    }

    /** * Obfuscates URI if there is a username and a password present */
    
Home | Imprint | This part of the site doesn't use cookies.