plenary.nvim
plenary.nvim copied to clipboard
Make synchronous curl timeout configurable
Calling something like curl.post synchronously (i.e without a callback) has a maximum timeout of 10s as the curl call is wrapped by a job with a 10s timeout.
-- curl.lua
if opts.callback then
return job:start()
else
job:sync(10000)
return response
end
Rather than passing in 10000, could an extra option be passed to the curl method instead? e.g. timeout
if opts.callback then
return job:start()
else
local timeout = 10000
if opts.timeout then
timeout = opts.timeout
end
job:sync(timeout)
return response
end
why not. PR welcome :)