how do I use a comma in a Guzzle request query string using the $options parameter?
Suppose I want to use Guzzle to make a request to http://example.com/?param=foo,bar. If I do: $client->request('GET', $url, 'query' => [ 'param' => 'foo,bar', ], ]); Then the comma is escaped, and it doesn't work properly. If I do: $client->request('GET', $url, 'query' => [ 'param' => ['foo', 'bar'], ], ]); Then the resulting URL has two 'param' items in the query string, one for each value, and the server doesn't like that (blame gitlab, it's their API I'm trying to use). The only thing I can find that works is writing the query string as an actual string as part of the URL. How can I do this
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.