Class: RestMan::Request::Init::Url::AddQueryFromHeaders
- Inherits:
-
ActiveMethod::Base
- Object
- ActiveMethod::Base
- RestMan::Request::Init::Url::AddQueryFromHeaders
- Defined in:
- lib/restman/request/init/url/add_query_from_headers.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/restman/request/init/url/add_query_from_headers.rb', line 10 def call url_params = params_from_headers if url_params && !url_params.empty? query_string = RestMan::Utils.encode_query_string(url_params) if url.include?('?') url + "&#{query_string}" else url + "?#{query_string}" end else url end end |