Method: URI::HTTP#request_uri
- Defined in:
- lib/extensions/uri/uri/http.rb
#request_uri ⇒ Object
Description
Returns the full path for an HTTP request, as required by Net::HTTP::Get.
If the URI contains a query, the full path is URI#path + ‘?’ + URI#query. Otherwise, the path is simply URI#path.
89 90 91 92 93 94 95 96 |
# File 'lib/extensions/uri/uri/http.rb', line 89 def request_uri r = path_query if r[0] != ?/ r = '/' + r end r end |