Your variable is already json_decoded, with the second parameter to false
.
json_decode()
works with objects by default (default = false
in this case), if you want an array, use the 2nd parameter true
, see http://php.net/json_decode.
I prefere object notation.
How do I access the ["http_response_code"] for instance?
$res->http_response_body
echo $res->http_response_body->message
//prints "Queued. Thank you."