Class: RedisRing::HttpClient

Inherits:
Object
  • Object
show all
Defined in:
lib/redis_ring/http_client.rb

Instance Method Summary collapse

Instance Method Details

#get(host, port, path, params = {}) ⇒ Object



5
6
7
# File 'lib/redis_ring/http_client.rb', line 5

def get(host, port, path, params = {})
  Net::HTTP.get(uri(host, port, path, params))
end

#post(host, port, path, params = {}) ⇒ Object



9
10
11
# File 'lib/redis_ring/http_client.rb', line 9

def post(host, port, path, params = {})
  Net::HTTP.post_form(uri(host, port, path, params), {}).body
end