lib/httpx/request.rb in httpx-0.19.8 vs lib/httpx/request.rb in httpx-0.20.0
- old
+ new
@@ -47,10 +47,12 @@
@uri = Utils.to_uri(uri)
if @uri.relative?
origin = @options.origin
raise(Error, "invalid URI: #{@uri}") unless origin
- @uri = origin.merge(@uri)
+ base_path = @options.base_path
+
+ @uri = origin.merge("#{base_path}#{@uri}")
end
raise(Error, "unknown method: #{verb}") unless METHODS.include?(@verb)
@headers = @options.headers_class.new(@options.headers)