Skip to content

Commit

Permalink
feat(curl): return job instance if the request is stream or callback (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alizdavoodi committed May 24, 2023
1 parent db3e425 commit 1403974
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/plenary/curl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ local request = function(specs)
local job = J:new(job_opts)

if opts.callback or opts.stream then
return job:start()
job:start()
return job
else
local timeout = opts.timeout or 10000
job:sync(timeout)
Expand Down

0 comments on commit 1403974

Please sign in to comment.