class Geminabox::HttpClientAdapter
Public Instance Methods
get(*args)
click to toggle source
# File lib/geminabox/http_adapter/http_client_adapter.rb, line 7 def get(*args) http_client.get(*args) end
get_content(*args)
click to toggle source
# File lib/geminabox/http_adapter/http_client_adapter.rb, line 11 def get_content(*args) http_client.get_content(*args) end
http_client()
click to toggle source
# File lib/geminabox/http_adapter/http_client_adapter.rb, line 27 def http_client @http_client ||= HTTPClient.new(ENV['http_proxy']) end
post(*args)
click to toggle source
# File lib/geminabox/http_adapter/http_client_adapter.rb, line 15 def post(*args) http_client.post(*args) end
set_auth(url, username = nil, password = nil)
click to toggle source
# File lib/geminabox/http_adapter/http_client_adapter.rb, line 19 def set_auth(url, username = nil, password = nil) http_client.set_auth(url, username, password) if username or password http_client.www_auth.basic_auth.challenge(url) # Workaround: https://github.com/nahi/httpclient/issues/63 http_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE http_client.send_timeout = 0 http_client.receive_timeout = 0 end