lib/cfoundry/rest_client.rb in cfoundry-0.5.0 vs lib/cfoundry/rest_client.rb in cfoundry-0.5.1.rc1
- old
+ new
@@ -149,9 +149,12 @@
rescue SocketError, Errno::ECONNREFUSED => e
raise TargetRefused, e.message
end
def construct_url(path)
+ uri = URI.parse(path)
+ return path if uri.scheme
+
path = "/#{path}" unless path[0] == ?\/
target + path
end
def get_method_class(method_string)