Skip to content
Advertisement

Building query string programmatically in Guzzle?

In my PHP Guzzle client code, I have something like

JavaScript

but instead I want to have something like:

JavaScript

Is it possible in Guzzle? From the documentation and random googling it would seem it is, but I can’t find exactly how.

Advertisement

Answer

Guzzle 6 – you could use query option param

JavaScript

http://docs.guzzlephp.org/en/stable/request-options.html#query

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement