curb icon indicating copy to clipboard operation
curb copied to clipboard

How to halt when error is found in multi mode?

Open Jacky1212 opened this issue 12 years ago • 2 comments

For example,

Curl::Multi.get('url1','url2','url3','url4','url5', easy_options, multi_options) do|easy|
  # do something interesting with the easy response
  puts easy.last_effective_url
end

How to stop all the requests (if not yet started), when url1 return error such as 404?

Jacky1212 avatar Oct 30 '13 14:10 Jacky1212

I believe, in this case you'll have to use the lower level API see the Multi Interface (Advanced): section.

taf2 avatar Oct 31 '13 12:10 taf2

Hello,

I have watched the doc, can you point me which API allow me the quit from the loop?

Thanks.

On Thu, Oct 31, 2013 at 8:01 PM, Todd Fisher [email protected]:

I believe, in this case you'll have to use the lower level API see the Multi Interface (Advanced): section.

— Reply to this email directly or view it on GitHubhttps://github.com/taf2/curb/issues/172#issuecomment-27480189 .

Jacky1212 avatar Nov 01 '13 04:11 Jacky1212