def retrieve_http(options)
        file_size = options.fetch(:file_size)
        headers = options.fetch(:headers)
        url = options.fetch(:url)
        retrieved = 0

        request = Typhoeus::Request.new(url.to_s, method: :get, headers: headers)
        request.on_headers do |response|
          raise DownloadError.new("#{self.class}: Failed to download #{url}: Status Code: #{response.code}", response) unless response.code == 200
        end
        request.on_body do |chunk|
          retrieved += chunk.bytesize
          yield(chunk, retrieved, file_size)
        end
        request.run
      end
def retrieve_http(options)
        file_size = options.fetch(:file_size)
        headers = options.fetch(:headers)
        url = options.fetch(:url)
        retrieved = 0

        request = Typhoeus::Request.new(url.to_s, method: :get, headers: headers)
        request.on_headers do |response|
          raise DownloadError.new("#{self.class}: Failed to download #{url}: Status Code: #{response.code}", response) unless response.code == 200
        end
        request.on_body do |chunk|
          retrieved += chunk.bytesize
          yield(chunk, retrieved, file_size)
        end
        request.run
      end
Retrieve a resource over the HTTP
 @param options [Hash]