Guzzle Post Null/Empty Values in Laravel
I ran into this issue yesterday and your question is very well ranked on Google. Shame that it has no answer.
The problem here is that form_params
uses http_build_query() under the hood and as stated in this user contributed note, null params are not present in the function's output.
I suggest that you pass this information via a JSON body (by using json
as key instead of form_params
) or via multipart (by using multipart
instead of form_params
).
Note: those 2 keys are available as constants, respectively GuzzleHttp\RequestOptions::JSON
and GuzzleHttp\RequestOptions::MULTIPART