Sha256: 7f1dd3fdea3253325d3fd4687bece4d0abe50c9650d8e59a3808cd89f8398e9c
Contents?: true
Size: 397 Bytes
Versions: 24
Compression:
Stored size: 397 Bytes
Contents
# frozen_string_literal: true require 'excon' # ProxyRb module ProxyRb # Download Content via proxy class HttpDownloader private attr_reader :downloader, :proxy public def initialize(proxy) @downloader = Excon @proxy = proxy end def process(resource) resource.content = downloader.get(resource.to_uri, proxy: proxy.to_uri) end end end
Version data entries
24 entries across 24 versions & 1 rubygems