Skip to content

Commit 155816b

Browse files
committed
feat: apply jq formatting on any JSON content-type, see #61
1 parent da70732 commit 155816b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/rest-nvim/curl/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ local function create_callback(method, url)
5252
-- Check if the content-type is "application/json" so we can format the JSON
5353
-- output later
5454
for _, header in ipairs(res.headers) do
55-
if string.find(header, "application/json") then
55+
if header:find("application") and header:find("json") then
5656
json_body = true
5757
break
5858
end

0 commit comments

Comments
 (0)