urlencoded method
Returns a map of the key-value pairs in the given URL-encoded string.
Implementation
@useResult
Future<Map<String, String>> urlencoded() async {
// If parsed body is already available, return it.
final Map<String, String>? parsedBody = context[key];
if (parsedBody != null) {
return parsedBody;
}
// Parse the body and store it in the context.
return context[key] = Uri.splitQueryString((await text()).trim());
}