$response->toArray()
Converts all relevant response attributes to an associative array for debugging, testing or whatever.
$response->toArray(): array{type: string, charset: string, code: int, headers: array, body: string}
Return type
array{type: string, charset: string, code: int, headers: array, body: string}