Class: Auger::Http
Instance Attribute Summary
Attributes inherited from Connection
#connection, #gateway, #options, #requests, #response, #roles
Instance Method Summary
collapse
Methods inherited from Connection
#initialize, load, #method_missing, #timeout, #try_close, #try_open, #try_open_direct, #try_open_tunnel
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Auger::Connection
Instance Method Details
#close(http) ⇒ Object
61
62
63
|
# File 'lib/auger/plugin/http.rb', line 61
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
51
52
53
54
55
56
57
58
59
|
# File 'lib/auger/plugin/http.rb', line 51
def open(host, options)
http = Net::HTTP.new(host, options[:port])
http.use_ssl = options[:ssl]
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if options[:insecure]
http.open_timeout = options[:timeout]
http.read_timeout = options[:timeout]
http.start
http
end
|
#post(url, &block) ⇒ Object
43
44
45
|
# File 'lib/auger/plugin/http.rb', line 43
def post(url, &block)
@requests << Auger::HttpPost.load(url, &block)
end
|
#propfind(url, &block) ⇒ Object
47
48
49
|
# File 'lib/auger/plugin/http.rb', line 47
def propfind(url, &block)
@requests << Auger::HttpPropfind.load(url, &block)
end
|