class Gem::URI::WS

def request_uri


uri.request_uri # => "/foo/bar?test=true"
uri = Gem::URI::WS.build(path: '/foo/bar', query: 'test=true')

Example:

Otherwise, the path is simply Gem::URI#path.
If the Gem::URI contains a query, the full path is Gem::URI#path + '?' + Gem::URI#query.

Returns the full path for a WS Gem::URI, as required by Net::HTTP::Get.

== Description
def request_uri
  return unless @path
  url = @query ? "#@path?#@query" : @path.dup
  url.start_with?(?/.freeze) ? url : ?/ + url
end