$client must be an instance of http\Client, Symfony\Bundle\FrameworkBundle\KernelBrowser used code example
Example: httpclient add authorization header symphony
$response = $client->request('GET', 'https://...', [
'auth_basic' => ['the-username', 'the-password'],
// ...
]);