lib/uffizzi/clients/api/http_client.rb in uffizzi-cli-0.12.0 vs lib/uffizzi/clients/api/http_client.rb in uffizzi-cli-0.14.0
- old
+ new
@@ -48,16 +48,16 @@
def build_request(uri, params, method)
headers = { 'Content-Type' => 'application/json' }
request = case method
when :get
- Net::HTTP::Get.new(uri.path, headers)
+ Net::HTTP::Get.new(uri.request_uri, headers)
when :post
- Net::HTTP::Post.new(uri.path, headers)
+ Net::HTTP::Post.new(uri.request_uri, headers)
when :delete
- Net::HTTP::Delete.new(uri.path, headers)
+ Net::HTTP::Delete.new(uri.request_uri, headers)
when :put
- Net::HTTP::Put.new(uri.path, headers)
+ Net::HTTP::Put.new(uri.request_uri, headers)
end
if request.instance_of?(Net::HTTP::Post) || request.instance_of?(Net::HTTP::Put)
request.body = params.to_json
end
request['Cookie'] = @auth_cookie