I get the following Warning:
Warning: http_build_query(): Parameter 1 expected to be Array or Object.
I know what this error represents and know why i get it, but I do not know how to fix it because the code works like a charm, so maybe you guys can help me out?
I curl a url with the following CURLOPT_POSTFIELDS:
curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query(json_encode($data)));
The vardump of json_encode($data) =
string(57) {"transporterCode":"TNT","trackAndTrace":"3SAOLD1234567"}"
Hence the error (it is a string), however I am not allowed to change anything because then the API call will fail. Is there anything I can do (besides supress the error) to fix it?
/love
Grumpymuppet
http_build_query([json_encode($data])?The supplied body does not meet the required specifications. Please check the message structure for errors.