convertes request to map
430925
@Deprecated
    public Map serialize() throws OpsGenieClientValidationException {
        validate();
        try {
            return JsonUtils.toMap(this);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
1058997
public String mapRequestPath(HttpServletRequest request) {

        String endpointName = Path.newInstance(request).firstSegment();
        return StringUtils.lowerCase(endpointName);
    }
863972
function to_map(params) {
  var map = {};

  params.forEach(function (param, i) {
    param.index = i;
    map[param.name] = param;
  });

  map.length = params.length;

  return map;
}
162425
function(request){
			var response = {};
			if(Array.isArray(request) && request.length > 0){
				if(request.indexOf('all') > -1){
					response = getData('all');
				}
				else{
					for(var d = 0; d < request.length; d++){
						var prop = request[d];
						response[prop] = getData(prop);
					}
				}
			}
			else if(request){
				response = getData(request);
			}
			else{
				response = "BAD_REQUEST_EXCEPTION"
			}
			return response;
		}
1295133
def to_map
      map = alg.to_map(fields)
      if b64 == false or b64 == true
        map = map.put('b64', b64)
      end
      return map
    end
1108309
public static Map<String, Object> createHeadersMap(HttpServletRequest request) {
        Map<String, Object> headersMap = new HashMap<>();
        for (Enumeration headerNameEnum = request.getHeaderNames(); headerNameEnum.hasMoreElements(); ) {
            String headerName = (String)headerNameEnum.nextElement();
            List<String> headerValues = new ArrayList<String>();

            CollectionUtils.addAll(headerValues, request.getHeaders(headerName));

            if (headerValues.size() == 1) {
                headersMap.put(headerName, headerValues.get(0));
            } else {
                headersMap.put(headerName, headerValues.toArray(new String[headerValues.size()]));
            }
        }

        return headersMap;
    }
67225
def prepare(self, request):
        

        data = []
        for conv in self.conversions:
            data.append(conv.prepare(request))

        return data
406727
private Map<String, String> getQueryParams(Request request) {
        final Map<String, String> queryParams = new HashMap<>();
        request.queryMap().toMap().forEach((k, v) -> {
            queryParams.put(k, v[0]);
        });
        return queryParams;
    }
1314885
function map (req, callback) {
  req.target(req.input || NOINPUT, req.options || NOOPTIONS, callback)
}
392554
private static Map<String, String> __getRequestHeaderMap(HttpServletRequest req) {
        Map<String, String> reqHeaders = new LinkedHashMap<>();
        Enumeration<String> headerNames = req.getHeaderNames();
        if (headerNames != null) {
            while (headerNames.hasMoreElements()) {
                String headerName = headerNames.nextElement();
                Enumeration<String> headerValues = req.getHeaders(headerName);

                if (headerValues != null) {
                    StringBuilder headerValueBuilder = new StringBuilder();
                    int i = 0;
                    while (headerValues.hasMoreElements()) {
                        if (i > 0) {
                            headerValueBuilder.append(", ");
                        }

                        headerValueBuilder.append(headerValues.nextElement());
                        i++;
                    }

                    reqHeaders.put(headerName, headerValueBuilder.toString());
                } else {
                    reqHeaders.put(headerName, "");
                }
            }
        }
        return reqHeaders;
    }
1031780
function _map(data, schema, options) {
    options = options || {};
    if (!schema || data === null) {
        return data;
    }
    if (schema instanceof Array) {
        return _mapArray(data, schema, options);
    }
    if (typeof schema === 'object') {
        return _mapObject(data, schema, options);
    }
    return schema;
}
795685
function encodeQueryMap(map) {
  var params = [];
  for (var key in map) {
    var value = map[key];
    params.push(key + '=' + urlEncode_(value));
  }
  return params.join('&');
}
849467
private Map<String, Object> parseRequestParameters(String requestParameters) {

        Map<String, Object> parameterMap;
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(requestParameters)) {
            parameterMap = new HashMap<String, Object>();
            String[] params = requestParameters.split("&");
            for (int i = 0; i < params.length; i++) {
                int position = params[i].indexOf("=");
                if (position >= 0) {
                    String key = params[i].substring(0, position);
                    String value = params[i].substring(position + 1);
                    if (value.contains(",")) {
                        parameterMap.put(key, value.split(","));
                    } else {
                        parameterMap.put(key, value);
                    }
                }
            }
        } else {
            parameterMap = Collections.<String, Object> emptyMap();
        }
        return parameterMap;
    }
1333762
public static Map<String, String[]> getRequestParameters(final HttpServletRequest request) {
		if (request.getAttribute(REQUEST_PROCESSED_KEY) == null) {
			setupRequestParameters(request);
		}
		return (Map<String, String[]>) request.getAttribute(REQUEST_PARAMETERS_KEY);
	}
950114
function serialize(queryParams) {
  return Object.keys(queryParams)
    .filter(key => queryParams[key] !== undefined)
    .map(key => arrayToStr(key, queryParams[key]))
    .join('&');
}
180395
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
    private static Map<String, List<Request>> asMap(
        final Collection<Request> reqs) throws IOException {
        final Map<String, List<Request>> map = new HashMap<>(reqs.size());
        for (final Request req : reqs) {
            final String header =
                new RqHeaders.Smart(req).single("Content-Disposition");
            final Matcher matcher = RqMtBase.NAME.matcher(header);
            if (!matcher.matches()) {
                throw new HttpException(
                    HttpURLConnection.HTTP_BAD_REQUEST,
                    String.format(
                        "\"name\" not found in Content-Disposition header: %s",
                        header
                    )
                );
            }
            final String name = matcher.group(1);
            if (!map.containsKey(name)) {
                map.put(name, new LinkedList<>());
            }
            map.get(name).add(req);
        }
        return map;
    }
20198
protected function matchRequestUriWithMap($request_uri, $url_from_map)
    {
        $url_from_map = preg_quote($url_from_map);
        $request_uri = urldecode($request_uri);

        // Don't know what's that for: "/$something..." => "/$something"
        $regex = preg_replace('/\\\\\$([\w\d]+)\.\.\./', '(?P<$1>.+)', str_replace('\.\.\.', '...', $url_from_map));

        // Find named parameters in URL /$something => $matches['something'] = $something
        $regex = preg_replace('/\\\\\$([\w\d]+)/', '(?P<$1>[^\/]+)', $regex);

        if (preg_match(":^$regex$:", $request_uri, $matches)) {
            return $matches;
        } else {
            return array();
        }
    }