Class: Auger::Http
- Inherits:
-
Connection
- Object
- Connection
- Auger::Http
- Defined in:
- lib/auger/plugin/http.rb
Instance Attribute Summary
Attributes inherited from Connection
#connection, #gateway, #options, #requests, #response, #roles
Instance Method Summary collapse
- #close(http) ⇒ Object
- #get(url, &block) ⇒ Object
- #open(host, options) ⇒ Object
- #post(url, &block) ⇒ Object
Methods inherited from Connection
#initialize, load, #method_missing, #timeout, #try_close, #try_open, #try_open_direct, #try_open_tunnel
Constructor Details
This class inherits a constructor from Auger::Connection
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Auger::Connection
Instance Method Details
#close(http) ⇒ Object
57 58 59 |
# File 'lib/auger/plugin/http.rb', line 57 def close(http) http.finish end |
#get(url, &block) ⇒ Object
39 40 41 |
# File 'lib/auger/plugin/http.rb', line 39 def get(url, &block) @requests << Auger::HttpGet.load(url, &block) end |
#open(host, options) ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/auger/plugin/http.rb', line 47 def open(host, ) http = Net::HTTP.new(host, [:port]) http.use_ssl = [:ssl] http.verify_mode = OpenSSL::SSL::VERIFY_NONE if [:insecure] http.open_timeout = [:timeout] http.read_timeout = [:timeout] http.start http end |