src/AbstractResponse.php
public function isJson()
    {
        $value = $this->getHeader('Content-Type');
        if ($value === null) {
            return false;
        }

        return !empty(preg_grep('|application/json|i', $value));
    }
public function isJson()
    {
        $value = $this->getHeader('Content-Type');
        if ($value === null) {
            return false;
        }

        return !empty(preg_grep('|application/json|i', $value));
    }
public function isJson ( ) { $ value = $ this -> getHeader ( 'Content-Type' ) ; if ( $ value === null ) { return false ; } return ! empty ( preg_grep ( '|application/json|i' , $ value ) ) ; }
Method checks whether response is a JSON response.
@return bool
Method checks whether response is a JSON response .