diff --git a/lib/api.rb b/lib/api.rb index 425c3dc..d8551c4 100644 --- a/lib/api.rb +++ b/lib/api.rb @@ -60,15 +60,15 @@ class W3DHub end # Handle arbitrary urls that may come through - url = nil if path.start_with?("http") uri = URI(path) + endpoint = uri.origin path = uri.request_uri - else - url = "#{endpoint}#{path}" end + url = "#{endpoint}#{path}" + logger.debug(LOG_TAG) { "Fetching #{method.to_s.upcase} \"#{url}\"..." } # Inject Authorization header if account data is populated