In Guzzle with version <6, I used to set my authentication header on the fly after initializing the client. For this, I used setDefaultOption() .
$client = new Client(['base_url' => $url]); $client->setDefaultOption('auth', [$username, $password]);
However, this feature seems to be deprecated in version 6. How do I do this?
Note. The reason I need to do this is because I use buzzing for batch requests, where some requests require different authentication parameters.
php guzzle
tomvo
source share