Module: Vonage::Http
Instance Method Summary collapse
Instance Method Details
#get(action, params = {}, num_retries = 0) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/vonage/http.rb', line 4 def get action, params = {}, num_retries = 0 = {query: params, headers: {'Cookie': @cookies.}} check_response self.class.get(action, ) rescue Vonage::AuthenticationError => e :get, action, params, num_retries, e rescue SocketError, Interrupt, EOFError, SystemCallError, Timeout::Error => e raise Vonage::NetError.new(e) end |
#parse_cookies(resp) ⇒ Object
15 16 17 18 19 |
# File 'lib/vonage/http.rb', line 15 def resp = HTTParty::CookieHash.new resp.get_fields('Set-Cookie').each { |c| .(c) } end |