From e8ad1e50e88e698e3a3a57cbe614a0b510587a1b Mon Sep 17 00:00:00 2001 From: Huynh Duc Dung Date: Mon, 18 Dec 2023 21:19:57 +0800 Subject: [PATCH] fix: simplify the check for json content type --- lua/hurl/utils.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/hurl/utils.lua b/lua/hurl/utils.lua index 2dd8854..aad040c 100644 --- a/lua/hurl/utils.lua +++ b/lua/hurl/utils.lua @@ -144,8 +144,7 @@ end ---@param content_type string ---@return boolean util.is_json_response = function(content_type) - return string.find(content_type, 'application/json') ~= nil or - string.find(content_type, 'application/vnd.api%+json') ~= nil + return string.find(content_type, 'json') ~= nil end util.is_html_response = function(content_type)