升級到Guzzle6後,我無法弄清楚如何爲客戶端設置默認查詢字符串。在Guzzle 6中設置默認查詢字符串
我有以下幾點:
$client = new \GuzzleHttp\Client([
'base_uri' => 'http://api.example.org/',
'query' => ['key' => 'secretKey']
]);
$client->get('extract', ['query' => ['url' => $url]]);
在此請求我的默認查詢刺痛key=secretKey
被忽略。
我該如何讓它工作?