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 63bae0f commit 5aa0999Copy full SHA for 5aa0999
1 file changed
lua/plenary/curl.lua
@@ -182,10 +182,14 @@ end
182
parse.request = function(opts)
183
if opts.body then
184
local b = opts.body
185
+ local silent_is_file = function()
186
+ local status, result = pcall(P.is_file, P.new(b))
187
+ return status and result
188
+ end
189
opts.body = nil
190
if type(b) == "table" then
191
opts.data = b
- elseif P.is_file(P.new(b)) then
192
+ elseif silent_is_file() then
193
opts.in_file = b
194
elseif type(b) == "string" then
195
opts.raw_body = b
0 commit comments