1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
module Typhoeus
# The Typhoeus configuration used to set global
# options.
# @example Set the configuration options within a block.
# Typhoeus.configure do |config|
# config.verbose = true
# end
#
# @example Set the configuration directly.
# Typhoeus::Config.verbose = true
module Config
extend self
# Defines whether the connection is blocked.
# Defaults to false. When set to true, only
# stubbed requests are allowed. A
# {Typhoeus::Errors::NoStub} error is raised,
# when trying to do a real request. It's possible
# to work around inside
# {Typhoeus.with_connection}.
#
# @return [ Boolean ]
#
# @see Typhoeus::Request::BlockConnection
# @see Typhoeus::Hydra::BlockConnection
# @see Typhoeus#with_connection
# @see Typhoeus::Errors::NoStub
attr_accessor :block_connection
# Defines whether GET requests are memoized when using the {Typhoeus::Hydra}.
#
# @return [ Boolean ]
#
# @see Typhoeus::Hydra
# @see Typhoeus::Hydra::Memoizable
attr_accessor :memoize
# Defines whether curls debug output is shown.
# Unfortunately it prints to stderr.
#
# @return [ Boolean ]
#
# @see http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTVERBOSE
attr_accessor :verbose
# Defines whether requests are cached.
#
# @return [ Object ]
#
# @see Typhoeus::Hydra::Cacheable
# @see Typhoeus::Request::Cacheable
attr_accessor :cache
# Defines whether to use a default user agent.
#
# @return [ String ]
#
# @see Typhoeus::Request#set_defaults
attr_accessor :user_agent
# Defines wether to use a proxy server for every request.
#
# @return [ String ]
#
# @see Typhoeus::Request#set_defaults
attr_accessor :proxy
end
end
|