i need to convert this URL into guzzle request
explorer/?method=GET&path=930657230472626%2Fratings%3Ffields%3Dopen_graph_story%2Creviewer&version=v3.2&classic=1
the only problem is how to set multiple values for fields param as you can see it's take two values
fields=open_graph_story,reviewer
so how i convert this into guzzle request here is request which i made so far
$this->client->request('GET', "/URL", [
'query' => [
'fields' => ['open_graph_story', 'reviewer']
],
]);
The fields parameter value is just a comma-separated string of field names, so you want to use
'fields' => 'open_graph_story,reviewer'
(With 'fields' => ['open_graph_story', 'reviewer'] you would get something like
…&fields[0]=open_graph_story&fields[1]=reviewer in the resulting URL, but the API just wants one value.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With