class RestClient::Request

def process_get_params url, headers

Extract the query parameters for get request and append them to the url
def process_get_params url, headers
  if method == :get
    get_params = {}
    headers.delete_if do |key, value|
      if 'params' == key.to_s.downcase && value.is_a?(Hash)
        get_params.merge! value
        true
      else
        false
      end
    end
    unless get_params.empty?
      query_string = get_params.collect { |k, v| "#{k.to_s}=#{CGI::escape(v.to_s)}" }.join('&')
      url + "?#{query_string}"
    else
      url
    end
  else
    url
  end
end