I'm currently using Guzzle to make a post request and send some parameters.
Here's my code:
$client = new Client();
$url = $this->my_url;
$client->setSslVerification(false,false,0);
$request = $client->post($url,null,array(
"param1" => $param1,
'param2' => $param2
));
$postBody = $request->getBody();
$response = $client->send($request);
$body = $response->getBody();
echo $body;
I get this return (JSON) when I'm doing the echo:
int 1
{"Response":true}
And of course, I can't do a json_decode
on it.
I don't understand why I can't do it and why I have this "int 1"
before it.
Any ideas about this issue?