Sha256: 6b53033524eb90d9157dca6dba46f7e66ebe9b6d637978361154942dc4b01564
Contents?: true
Size: 614 Bytes
Versions: 2
Compression:
Stored size: 614 Bytes
Contents
# TODO: a better solution is to only load the requester if it is in use, # rather than loading them all on startup. begin require "typhoeus" module Embedly module Typhoeus # :nodoc: class Request < Embedly::Request::Base # Perform request using typhoeus def get(uri, options = {}) options[:timeout] *= 1000 ::Typhoeus::Request.get uri.to_s, :headers => options[:headers], :timeout => options[:timeout] end end end end Embedly.configuration.add_requester :typhoeus do |api| Embedly::Typhoeus::Request.new(api) end rescue LoadError end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
embedly-1.9.1 | lib/embedly/request/typhoeus.rb |
embedly-1.9.0 | lib/embedly/request/typhoeus.rb |