RequestParams class

Represents a collection of parameters.

Parameters are name-value pairs. But there can be multiple values for the same name. This class provides convenient methods to access the values when the caller expects at-most-one value, as well as methods to access multi-valued parameters. Multi-valued parameters usually occur when processing sets of checkboxes or radio buttons.

The RequestParams is intended to be immutable, since it is normally created by the framework when it receives a HTTP request to process, and passes it to the application's request handlers (which should have no reason to modify them).

There is one situation where an application might want to modify RequestParams, and that is during testing: when the test program wants to build up and modify parameters to simulate different requests. For that purpose, test programs should use instances of the RequestParamsMutable class.

Implementers

Properties

isEmpty → bool
Returns true if there are no keys.
read-only
isNotEmpty → bool
Returns true if there is at least one key.
read-only
keys → Iterable<String>
All the keys.
read-only
length → int
The number of keys.
read-only
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

toString() → String
Returns a string representation of this object.
override
values(String key, { bool raw: false }) → List<String>
Retrieves the values for a key, possibly multiple values. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator [](String key) → String
Retrieves a single sanitized value for the key. [...]
operator ==(dynamic other) → bool
The equality operator. [...]
inherited