protected function processResponseBody($jsonData, $asJson = true)
{
if ($asJson) {
try {
$this->responseData = $this->decodeJson($jsonData);
$this->responseIsJson = true;
$this->responseDecodeException = null;
} catch (\Exception $e) {
$this->responseData = $jsonData;
$this->responseIsJson = false;
$this->responseDecodeException = $e;
}
} else {
$this->responseData = $jsonData;
$this->responseIsJson = false;
$this->responseDecodeException = null;
}
}