php - How i can use variables on json with Guzzle?
669
I'm trying to use variables in php to add values to the json on Guzzle, but that appear that's not working, i'm doing it wrong? Thanks in advance, im new in the use of Guzzle. (Guzzle 6)
$send_response = $send->post("https://yyy.com/services/" , [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' .$token
],
'json' => [
'key' => $value,
'key2' => $value2,
]
]);