Edit this page

up.Params up.Params.prototype.toQuery(params)
Class method

This feature is experimental. It may be changed or removed in a future version.

Returns an query string for this up.Params instance.

The keys and values in the returned query string will be percent-encoded. Non-primitive values (like File will be omitted from the retuned query string.

Example

var params = new up.Params({ foo: 'bar', baz: 'bam' })
var query = params.toQuery()

// query is now: 'foo=bar&baz=bam'

Parameters

params ObjectorFormDataorstringorArrayorundefined

the params to convert

Return value

string

a query string built from the given params