We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fc2bb8 commit 38ceda9Copy full SHA for 38ceda9
lua/rest-nvim/client/curl.lua
@@ -204,7 +204,13 @@ function client.request(request)
204
local _url = curl.url()
205
_url:set_url(request.request.url)
206
-- Re-add the request query with the encoded parameters
207
- _url:set_query(_url:get_query(), curl.U_URLENCODE)
+ local query = _url:get_query()
208
+ if type(query) == "string" then
209
+ _url:set_query('')
210
+ for param in vim.gsplit(query, "&") do
211
+ _url:set_query(param, curl.U_URLENCODE + curl.U_APPENDQUERY)
212
+ end
213
214
-- Re-add the request URL to the req object
215
req:setopt_url(_url:get_url())
216
end
0 commit comments