decodePostedParameters static method

Future<Map<String, String>> decodePostedParameters(
  1. Stream<List<int>> request, {
  2. Map<String, String>? parameters,
  3. int? maxLength,
})

Decodes the parameters of the POST request.

  • parameters - the map to put the decoded parameters into. If null, this method will instantiate a new map. To merge the parameters found in the query string, you can do:

    final params = HttpUtil.decodePostedParameters( request, new Map.from(request.queryParameters));

  • maxLength the maximal allowed length. If omitted, no limitation at all. If specified and the input is more than allowed, PayloadException will be thrown.

Implementation

static Future<Map<String, String>> decodePostedParameters(
    Stream<List<int>> request, {Map<String, String>? parameters,
    int? maxLength}) async
=> decodeQuery(await readAsString(request, maxLength: maxLength),
      parameters: parameters);