Module: Typhoeus::Config
Overview
The Typhoeus configuration used to set global options.
Instance Attribute Summary collapse
-
#block_connection ⇒ Boolean
Defines whether the connection is blocked.
-
#cache ⇒ Object
Defines whether requests are cached.
-
#connecttimeout ⇒ Integer, Float
Defines the default HTTP timeout for the connection phase in seconds See README for more details about timeouts.
-
#memoize ⇒ Boolean
Defines whether GET requests are memoized when using the Hydra.
-
#proxy ⇒ String
Defines wether to use a proxy server for every request.
-
#timeout ⇒ Integer, Float
Defines the default HTTP timeout for the entire request in seconds See README for more details about timeouts.
-
#user_agent ⇒ String
Defines whether to use a default user agent.
-
#verbose ⇒ Boolean
Defines whether curls debug output is shown.
Instance Attribute Details
#block_connection ⇒ Boolean
Defines whether the connection is blocked. Defaults to false. When set to true, only stubbed requests are allowed. A Errors::NoStub error is raised, when trying to do a real request. It’s possible to work around inside Typhoeus.with_connection.
29 30 31 |
# File 'lib/typhoeus/config.rb', line 29 def block_connection @block_connection end |
#cache ⇒ Object
Defines whether requests are cached.
69 70 71 |
# File 'lib/typhoeus/config.rb', line 69 def cache @cache end |
#connecttimeout ⇒ Integer, Float
Defines the default HTTP timeout for the connection phase in seconds See README for more details about timeouts
61 62 63 |
# File 'lib/typhoeus/config.rb', line 61 def connecttimeout @connecttimeout end |
#memoize ⇒ Boolean
Defines whether GET requests are memoized when using the Hydra.
37 38 39 |
# File 'lib/typhoeus/config.rb', line 37 def memoize @memoize end |
#proxy ⇒ String
Defines wether to use a proxy server for every request.
83 84 85 |
# File 'lib/typhoeus/config.rb', line 83 def proxy @proxy end |
#timeout ⇒ Integer, Float
Defines the default HTTP timeout for the entire request in seconds See README for more details about timeouts
53 54 55 |
# File 'lib/typhoeus/config.rb', line 53 def timeout @timeout end |
#user_agent ⇒ String
Defines whether to use a default user agent.
76 77 78 |
# File 'lib/typhoeus/config.rb', line 76 def user_agent @user_agent end |
#verbose ⇒ Boolean
Defines whether curls debug output is shown. Unfortunately it prints to stderr.
45 46 47 |
# File 'lib/typhoeus/config.rb', line 45 def verbose @verbose end |