Class: URI::HTTP
- Defined in:
- lib/uri/query_params/core_ext/uri/http.rb
Instance Attribute Summary
Attributes included from QueryParams::Mixin
Instance Method Summary collapse
- #raw_request_uri ⇒ Object
-
#request_uri ⇒ String?
Returns the full path for an HTTP request.
Methods inherited from Generic
Methods included from QueryParams::Mixin
#each_query_param, included, #initialize_copy
Instance Method Details
#raw_request_uri ⇒ Object
10 |
# File 'lib/uri/query_params/core_ext/uri/http.rb', line 10 alias raw_request_uri request_uri |
#request_uri ⇒ String?
Returns the full path for an HTTP request.
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/uri/query_params/core_ext/uri/http.rb', line 26 def request_uri if defined?(@query_params) && @query_params return unless @path query = URI::QueryParams.dump(@query_params) url = "#{@path}?#{query}" url = "/#{url}" unless url.start_with?('/') url else raw_request_uri end end |