lib/sensu/api/http_handler.rb
# Parse the HTTP request query string for parameters. This
# method creates `@params`, a hash of parsed query parameters,
# used by the API routes. This method also creates
# `@filter_params`, a hash of parsed response content filter
# parameters.
Parse the HTTP request query string for parameters. This
method creates `@params`, a hash of parsed query parameters,
used by the API routes. This method also creates
`@filter_params`, a hash of parsed response content filter
parameters.
Parse the HTTP request query string for parameters . This method creates ` @params ` a hash of parsed query parameters used by the API routes . This method also creates ` @filter_params ` a hash of parsed response content filter parameters .
def parse_parameters
        @params = {}
        if @http_query_string
          @http_query_string.split("&").each do |pair|
            key, value = pair.split("=")
            @params[key.to_sym] = value
            if key.start_with?("filter.")
              filter_param = key.sub(/^filter\./, "")
              @filter_params ||= {}
              @filter_params[filter_param] = value
            end
          end
        end
      end
def parse_parameters @params = { } if @http_query_string @http_query_string . split ( "&" ) . each do | pair | key , value = pair . split ( "=" ) @params [ key . to_sym ] = value if key . start_with? ( "filter." ) filter_param = key . sub ( / ^filter \. / , "" ) @filter_params ||= { } @filter_params [ filter_param ] = value end end end end
Parse the HTTP request query string for parameters.
Parse the HTTP request query string for parameters .