How can you send a generated GET request using the GuzzleHttp library in which one of the parameters must be a one-dimensional array (without indexes)
Those. The parameters in the GET request should be: opt=1¶m[]=val1¶m[]=val2
$client = new \GuzzleHttp\Client()->get('https://www.url.com/api', [ 'form_params' => [ 'opt' => 1, 'param' => ['val1', 'val2'], ] ]); GuzzleHttp uses the function of forming the GET string http_build_query() which the nested array is indexed by force. The result is the following query:opt=1¶m[1]=val1¶m[2]=val2