Airship\Engine\Hail::parseJSON PHP Method

parseJSON() public method

Parse a signed JSON response
public parseJSON ( Response $response ) : mixed
$response Response
return mixed
    public function parseJSON(Response $response)
    {
        $code = $response->getStatusCode();
        if ($code >= 200 && $code < 300) {
            $body = (string) $response->getBody();
            return \Airship\parseJSON($body, true);
        }
        throw new TransferException();
    }