The up.Params
class offers a consistent API to read and manipulate request parameters
independent of their type.
Request parameters are used in form submissions and
URLs. Methods like up.submit()
or up.replace()
accept
request parameters as a { params }
option.
The following types of parameter representation are supported:
{ email: 'foo@bar.com' }
'email=foo%40bar.com'
{ name, value }
objects like [{ name: 'email', value: 'foo@bar.com' }]
Constructs a new up.Params
instance.
Adds a new entry with the given name
and value
.
Adds all entries from the given list of params.
Adds params from the given HTML form field.
Removes all params from this object.
Deletes all entries with the given name
.
Returns the first param value with the given name
from the given params
.
Returns an array of all param values with the given name
.
Returns the first param value with the given name
.
Sets the value
for the entry with given name
.
Returns an array representation of this up.Params
instance.
Returns a FormData
representation
of this up.Params
instance.
Returns an object representation of this up.Params
instance.
Returns an query string for this up.Params
instance.
Builds an URL string from the given base URL and
this up.Params
instance as a query string.
Constructs a new up.Params
instance from one or more
HTML form field.
Constructs a new up.Params
instance from the given <form>
.
Constructs a new up.Params
instance from the given URL's
query string.
Returns the given URL without its query string.