I am able to make a post request with guzzle php using the following code
$request = $this->request('POST', $this->url, array('form_params' => $params));
Everything works fine. But when I call
$request->getBody()->getContents();
A string "root" is attached to the beginning of the content returned.
I dont seems to understand why this is happening.
Any assistance will be appreciated.
An example of what I get when I var_dump is this
string(4) "root"
{"access_token":"kjVbpzmk3VAWTHn3jyeaM1nal1zkFIPZrI8khmKQ",
"token_type":"Bearer",
"expires_in":604800,
"user_id":3,
"user":{
"id":3,
"name":"Thomas Paul"
}
}
Meanwhile in postman I get this
{
"access_token": "y9Jeovb3EERC4oE13yCS8WfFi3XK1eul4D4luwX3",
"token_type": "Bearer",
"expires_in": 604800,
"user_id": 3,
"user": {
"id": 3,
"name": "Thomas Paul"
}
}