protected function _checkRequestMethods()
    {
        if ($this->_request()->is('put')) {
            throw new BadRequestException('JSON API does not support the PUT method, use PATCH instead');
        }

        if (!$this->_request()->contentType()) {
            return true;
        }

        $jsonApiMimeType = $this->_response()->getMimeType('jsonapi');

        if ($this->_request()->contentType() !== $jsonApiMimeType) {
            throw new BadRequestException("JSON API requests with data require the \"$jsonApiMimeType\" Content-Type header");
        }

        return true;
    }