Skip to content

Commit

Permalink
feat: apply jq formatting on any JSON content-type, see #61
Browse files Browse the repository at this point in the history
  • Loading branch information
NTBBloodbath committed Sep 2, 2021
1 parent da70732 commit 155816b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/rest-nvim/curl/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ local function create_callback(method, url)
-- Check if the content-type is "application/json" so we can format the JSON
-- output later
for _, header in ipairs(res.headers) do
if string.find(header, "application/json") then
if header:find("application") and header:find("json") then
json_body = true
break
end
Expand Down

0 comments on commit 155816b

Please sign in to comment.