public function isJson(HttpHeaders $headers): bool
    {
        $contentType = null;
        $headers->tryGetFirst('Content-Type', $contentType);

        return preg_match("/application\/json/i", $contentType) === 1;
    }