def get
         schedule do
            inc_io
            @@log.info("Requesting: #{@url}")
            http = EM::HttpRequest.new(@url).get :redirects => 5
      
            http.callback do |h|
              succeed http.response
              dec_io
            end
    
            http.headers do |headers|
              unless OK_ERROR_CODES.include?(headers.status)
                fail("Error (#{headers.status}) with url:#{@url}")
                dec_io
              end
            end        
    
            http.errback do
              fail("Error downloading #{@url}")
              dec_io
            end       
          end
        self # Fluent interface
      end
def get
         schedule do
            inc_io
            @@log.info("Requesting: #{@url}")
            http = EM::HttpRequest.new(@url).get :redirects => 5
      
            http.callback do |h|
              succeed http.response
              dec_io
            end
    
            http.headers do |headers|
              unless OK_ERROR_CODES.include?(headers.status)
                fail("Error (#{headers.status}) with url:#{@url}")
                dec_io
              end
            end        
    
            http.errback do
              fail("Error downloading #{@url}")
              dec_io
            end       
          end
        self # Fluent interface
      end
Non blocking get url