params method

Map<String, String> params(
  1. HttpRequest request
)

Retrieves query parameters from the given HTTP request.

Returns a map containing key-value pairs of query parameters. For example, a request with the URI /endpoint?name=value will return {'name': 'value'}.

  • Parameter request: The HTTP request containing the URI with query parameters.

Implementation

Map<String, String> params(HttpRequest request) {
  return request.uri.queryParameters;
}