Skip to content

Commit 6778384

Browse files
authored
feat(curl): add support for curl insecure and curl proxy (#559)
1 parent 4f71c0c commit 6778384

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lua/plenary/curl.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ all curl methods accepts
1313
output = "where to download something." (filepath)
1414
timeout = "request timeout in mseconds" (number)
1515
http_version = "HTTP version to use: 'HTTP/0.9', 'HTTP/1.0', 'HTTP/1.1', 'HTTP/2', or 'HTTP/3'" (string)
16+
proxy = "[protocol://]host[:port] Use this proxy" (string)
17+
insecure = "Allow insecure server connections" (boolean)
1618
1719
and returns table:
1820
@@ -218,6 +220,12 @@ parse.request = function(opts)
218220
end
219221
end
220222

223+
if opts.insecure then
224+
table.insert(result, "--insecure")
225+
end
226+
if opts.proxy then
227+
table.insert(result, { "--proxy", opts.proxy })
228+
end
221229
if opts.compressed then
222230
table.insert(result, "--compressed")
223231
end

0 commit comments

Comments
 (0)