Edit this page

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

This feature is experimental. Please share your experiences so we know what to keep or change.

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