Skip to content

Commit

Permalink
fix: remove formatting header keys for curl
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Chu authored and Conni2461 committed Feb 11, 2025
1 parent 1a0bb83 commit 57de0b8
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions lua/plenary/curl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,7 @@ parse.headers = function(t)
if not t then
return
end
local upper = function(str)
return string.gsub(" " .. str, "%W%l", string.upper):sub(2)
end
return util.kv_to_list(
(function()
local normilzed = {}
for k, v in pairs(t) do
normilzed[upper(k:gsub("_", "%-"))] = v
end
return normilzed
end)(),
"-H",
": "
)
return util.kv_to_list(t, "-H", ": ")
end

parse.data_body = function(t)
Expand Down

0 comments on commit 57de0b8

Please sign in to comment.