Module: Resto::Request::Option
- Included in:
- Base
- Defined in:
- lib/resto/request/option.rb
Instance Method Summary collapse
-
#close_on_empty_response(close_on_empty_response) ⇒ Object
:ssl_attributes.
-
#open_timeout(time) ⇒ Object
Number of seconds to wait for the connection to open.
- #options ⇒ Object
-
#read_timeout(time) ⇒ Object
Number of seconds to wait for one block to be read (via one read(2) call).
-
#set_debug_output(output) ⇒ Object
WARNING This method opens a serious security hole.
-
#timeout(timeout) ⇒ Object
Seconds to wait until reading one block (by one read(2) call).
Instance Method Details
#close_on_empty_response(close_on_empty_response) ⇒ Object
:ssl_attributes
92 93 94 |
# File 'lib/resto/request/option.rb', line 92 def close_on_empty_response(close_on_empty_response)# tap { .store(:close_on_empty_response, close_on_empty_response) } end |
#open_timeout(time) ⇒ Object
Number of seconds to wait for the connection to open. If the HTTP object cannot open a connection in this many seconds, it raises a TimeoutError exception.
99 100 101 |
# File 'lib/resto/request/option.rb', line 99 def open_timeout(time)# tap { .store(:open_timeout, time)} end |
#options ⇒ Object
9 10 11 |
# File 'lib/resto/request/option.rb', line 9 def @options ||= {} end |
#read_timeout(time) ⇒ Object
Number of seconds to wait for one block to be read (via one read(2) call). If the HTTP object cannot read data in this many seconds, it raises a TimeoutError exception.
106 107 108 |
# File 'lib/resto/request/option.rb', line 106 def read_timeout(time)# tap { .store(:read_timeout, time)} end |
#set_debug_output(output) ⇒ Object
121 122 123 |
# File 'lib/resto/request/option.rb', line 121 def set_debug_output(output) tap { .store(:set_debug_output, output)} end |
#timeout(timeout) ⇒ Object
Seconds to wait until reading one block (by one read(2) call).
111 112 113 |
# File 'lib/resto/request/option.rb', line 111 def timeout(timeout) # 1.8.7 1.9?? tap { .store(:timeout, timeout)} end |