Class: Anemone::HTTP
- Inherits:
-
Object
- Object
- Anemone::HTTP
- Defined in:
- lib/monkeys/anemone.rb
Instance Method Summary collapse
-
#proxy_password ⇒ Object
The proxy password.
-
#proxy_user ⇒ Object
The proxy user string.
- #refresh_connection(url) ⇒ Object
Instance Method Details
#proxy_password ⇒ Object
The proxy password
16 17 18 |
# File 'lib/monkeys/anemone.rb', line 16 def proxy_password @opts[:proxy_password] end |
#proxy_user ⇒ Object
The proxy user string
9 10 11 |
# File 'lib/monkeys/anemone.rb', line 9 def proxy_user @opts[:proxy_user] end |
#refresh_connection(url) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/monkeys/anemone.rb', line 20 def refresh_connection(url) http = Net::HTTP.new(url.host, url.port, proxy_host, proxy_port, proxy_user, proxy_password) http.read_timeout = read_timeout if read_timeout if url.scheme == 'https' http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE end @connections[url.host][url.port] = http.start end |