Skip to content

Commit 1403974

Browse files
authored
feat(curl): return job instance if the request is stream or callback (#483)
1 parent db3e425 commit 1403974

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/plenary/curl.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ local request = function(specs)
284284
local job = J:new(job_opts)
285285

286286
if opts.callback or opts.stream then
287-
return job:start()
287+
job:start()
288+
return job
288289
else
289290
local timeout = opts.timeout or 10000
290291
job:sync(timeout)

0 commit comments

Comments
 (0)