lib/rest_connection.rb in rest_connection-0.0.22 vs lib/rest_connection.rb in rest_connection-0.0.23
- old
+ new
@@ -87,10 +87,11 @@
# href = "servers" this will be concat'd on to the api_url from the settings
# additional_parameters = Hash or String of parameters to pass to HTTP::Get
def get(href, additional_parameters = "")
rest_connect do |base_uri,headers|
href = "#{base_uri}/#{href}" unless begins_with_slash(href)
- new_path = URI.escape(href + @settings[:extension] + "?") + requestify(additional_parameters)
+ params = requestify(additional_parameters) || ""
+ new_path = URI.escape(href + @settings[:extension] + "?") + params
Net::HTTP::Get.new(new_path, headers)
end
end
# connection.post(server_url + "/start")