lib/unleash/util/http.rb in unleash-3.2.5 vs lib/unleash/util/http.rb in unleash-4.0.0

- old
+ new

@@ -2,20 +2,18 @@ require 'uri' module Unleash module Util module Http - def self.get(url, etag = nil) - uri = URI(url) + def self.get(uri, etag = nil) http = http_connection(uri) request = Net::HTTP::Get.new(uri.request_uri, http_headers(etag)) http.request(request) end - def self.post(url, body) - uri = URI(url) + def self.post(uri, body) http = http_connection(uri) request = Net::HTTP::Post.new(uri.request_uri, http_headers) request.body = body