public function asJson()
{
if (!$this->isJsonMessage($this->response->headers)) {
throw new \RuntimeException('The response is not a valid json response');
}
return json_decode($this->response->content(), true);
}