Returns a routing header string for the given request parameters.

    Args:
        params (Mapping[str, Any]): A dictionary containing the request
            parameters used for routing.

    Returns:
        str: The routing header string.
161748
def to_routing_header(params):
    
    if sys.version_info[0] < 3:
        # Python 2 does not have the "safe" parameter for urlencode.
        return urlencode(params).replace("%2F", "/")
    return urlencode(
        params,
        # Per Google API policy (go/api-url-encoding), / is not encoded.
        safe="/",
    )
827480
def get_request_headers(self, *args, **kwds):
        
        if self.request_headers:
            return self._unpack_headers(self.request_headers)
798473
def headers(params={}):
    
    def decorator(f):

        if inspect.isclass(f):
            h = headers(params)
            apply_function_to_members(f, h)
            return f

        @functools.wraps(f)
        def decorated_function(*args, **kwargs):
            resp = make_response(f(*args, **kwargs))
            h = resp.headers
            for header, value in params.items():
                h[header] = value
            return resp
        return decorated_function
    return decorator
958984
def _build_param_string(params):
        
        pairs = []
        for key, value in params.iteritems():
            if value is None:
                value = ''
            pairs.append('{0}={1}'.format(key, value))
        if len(pairs) > 0:
            return '?{0}'.format('&'.join(pairs))
        return ''
1319846
def _get_request(self, url, headers, params=None):
        
        return self._session.get(url, headers=headers, params=params)
670016
async def _resolve_params(self,
                              params: Dict[Text, Any],
                              request: Optional['Request']):
        

        out = {}

        for k, v in params.items():
            if isinstance(v, StringToTranslate):
                out[k] = await render(v, request)
            else:
                out[k] = v

        return out
311196
def parse_params(self, params):
        
        for (key, value) in params.items():
            if not isinstance(value, str):
                string_params = self.to_string(value)
                params[key] = string_params
        return params
1139172
def query_string
      params = {}

      self.query_params.each do |param|
        params[param.name] = param.value
      end

      return ::URI::QueryParams.dump(params)
    end
1059470
def _EncodeParameters(self, parameters):
        

        if parameters is None:
            return None
        else:
            return urlencode(dict([(k, self._Encode(v)) for k, v in list(parameters.items()) if v is not None]))
894057
def encode_params(params)
      return params.map do |p|
        if p.is_a?(Integer)
          Util.int_to_hex(p)
        else
          p
        end
      end
    end
1331569
function getRouteParams(route, params) {
  const routeParams = {}

  if (!route.path)
    return routeParams

  const paramNames = getParamNames(route.path)

  for (const p in params) {
    if (
      Object.prototype.hasOwnProperty.call(params, p) &&
      paramNames.indexOf(p) !== -1
    ) {
      routeParams[p] = params[p]
    }
  }

  return routeParams
}
897002
def getParam(self, paramName):
        
        param = getattr(self, paramName)
        if isinstance(param, Param):
            return param
        else:
            raise ValueError("Cannot find param with name %s." % paramName)
482270
def raw
      headers = http_headers.map { |k, v| "#{k}: #{v}\r\n" }.join
      format "%s %s %s\r\n%s\r\n%s", request_method.upcase, fullpath, env["SERVER_PROTOCOL"], headers, body_string
    end
319659
def _convert_params(self, parameters):
        
        if isinstance(parameters, dict):
            return [self.make_param(name, value)
                    for name, value in parameters.items()]
        else:
            params = []
            for parameter in parameters:
                params.append(self.make_param('', parameter))
            return params
1372332
def get(path, params = {})
      headers = request_headers(:get, path, params)
      request(:get, path, params, headers)
    end
346673
def _get_response(self, params):
        
        return self._session.get(
            self._api_url, params=params, timeout=self._timeout
        ).json(encoding="utf8")
409771
def _get_parameter_string(self) -> str:
        
        parameters = []
        for parameter in self.parameters:
            name = parameter["name"]
            if parameter["type"]:
                name += ": " + dequalify(parameter["type"])
                if parameter["value"]:
                    name += " = " + parameter["value"]
            elif parameter["value"]:
                name += "=" + parameter["value"]
            parameters.append(name)
        return ", ".join(parameters)