Having a problem with guzzle and json in a symfony console app, my code looks like this:
$client = new Client([
'timeout' => 15,0,
]);
$body =[
"revision" => "1",
"changelog" => "stuff",
"description" => "Testing",
"user" => "Foo bar",
];
var_dump(json_encode($body));
$request = new GuzzleRequest('POST', "https://api.newrelic.com/v2/applications/$appId/deployments.json", array(), ['deployment' => json_encode($body)]);
$response = $client->send($request, ['headers' => ['X-Api-Key' => $apiKey]], ['timeout' => 200]);
The response I get is:
Invalid resource type: array