Sha256: 8387c98d132413e00736714fdc451b9039dcd9e1f7f2fcb835f9c1e263ad7ac5
Contents?: true
Size: 602 Bytes
Versions: 1
Compression:
Stored size: 602 Bytes
Contents
require 'typhoeus' module Iconoclasm module Downloader @@user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)' def self.user_agent=(agent) @@user_agent = agent end def self.user_agent @@user_agent end def user_agent @@user_agent end def get(url) Typhoeus::Request.get(url, :user_agent => user_agent, :follow_location => true, :timeout => Iconoclasm.timeout||=1000) end def head(url) Typhoeus::Request.head(url, :user_agent => user_agent, :timeout => Iconoclasm.timeout||=1000) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
iconoclasm-1.0.7 | lib/iconoclasm/downloader.rb |