Client options 4.0+ ​
📝 Name: clientOptions
· 🖥️ Option: -t
, --client-options
Additional configuration for shared Guzzle client.
INFO
The shared Guzzle client is used in default crawlers and default parser. Custom crawlers and parsers may also use it, if properly configured via dependency injection.
Example ​
Pass client options in the expected input format.
IMPORTANT
When passing client options as command parameter or environment variable, make sure to pass them as JSON-encoded string.
bash
./cache-warmup.phar --client-options '{"auth": ["username", "password"]}'
json
{
"clientOptions": {
"auth": ["username", "password"]
}
}
php
use EliasHaeussler\CacheWarmup;
return static function (CacheWarmup\Config\CacheWarmupConfig $config) {
$config->setClientOption('auth', ['username', 'password']);
return $config;
};
yaml
clientOptions:
auth: ['username', 'password']
bash
CACHE_WARMUP_CLIENT_OPTIONS='{"auth": ["username", "password"]}'