URLSearchParams

open class URLSearchParams(init: ReadonlyArray<Tuple2<ERROR CLASS: Symbol not found for JsString, ERROR CLASS: Symbol not found for JsString>> = definedExternally) : ReadonlyMap<ERROR CLASS: Symbol not found for JsString, ERROR CLASS: Symbol not found for JsString> , BodyInit(source)

The URLSearchParams interface defines utility methods to work with the query string of a URL.

MDN Reference

Constructors

Link copied to clipboard
constructor(init: ReadonlyArray<Tuple2<ERROR CLASS: Symbol not found for JsString, ERROR CLASS: Symbol not found for JsString>> = definedExternally)
constructor(init: ReadonlyRecord<ERROR CLASS: Symbol not found for JsString, ERROR CLASS: Symbol not found for JsString>)
constructor(init: String)
constructor(init: URLSearchParams)

Properties

Link copied to clipboard
open override val size: Int

The size read-only property of the URLSearchParams interface indicates the total number of search parameter entries.

Functions

Link copied to clipboard
fun append(key: String, value: String)

The append() method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.

Link copied to clipboard
fun delete(key: String, value: String = definedExternally)

The delete() method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.

Link copied to clipboard
open override fun entries(): JsIterator<Tuple2<ERROR CLASS: Symbol not found for JsString, ERROR CLASS: Symbol not found for JsString>>
Link copied to clipboard
abstract fun forEach(action: (@R|kotlin/ParameterName|(name = String(value)) ERROR CLASS: Symbol not found for JsString, @R|kotlin/ParameterName|(name = String(key)) ERROR CLASS: Symbol not found for JsString) -> Unit)
open override fun forEach(action: (@R|kotlin/ParameterName|(name = String(value)) ERROR CLASS: Symbol not found for JsString, @R|kotlin/ParameterName|(name = String(key)) ERROR CLASS: Symbol not found for JsString) -> Unit)
Link copied to clipboard
abstract fun get(key: ERROR CLASS: Symbol not found for JsString): ERROR CLASS: Symbol not found for JsString??

open override fun get(key: ERROR CLASS: Symbol not found for JsString): ERROR CLASS: Symbol not found for JsString??

The get() method of the URLSearchParams interface returns the first value associated to the given search parameter.

Link copied to clipboard
fun getAll(key: String): ReadonlyArray<ERROR CLASS: Symbol not found for JsString>

The getAll() method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.

Link copied to clipboard
abstract override fun has(key: ERROR CLASS: Symbol not found for JsString): Boolean
fun has(key: String, value: String): Boolean

open override fun has(key: ERROR CLASS: Symbol not found for JsString): Boolean

The has() method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.

Link copied to clipboard
open override fun keys(): JsIterator<ERROR CLASS: Symbol not found for JsString>
Link copied to clipboard
fun set(key: String, value: String)

The set() method of the URLSearchParams interface sets the value associated with a given search parameter to the given value. If there were several matching values, this method deletes the others. If the search parameter doesn't exist, this method creates it.

Link copied to clipboard
fun sort()

The URLSearchParams.sort() method sorts all key/value pairs contained in this object in place and returns undefined. Key/value pairs are sorted by the values of the UTF-16 code units of the keys. This method uses a stable sorting algorithm (i.e., the relative order between key/value pairs with equal keys will be preserved).

Link copied to clipboard
open override fun values(): JsIterator<ERROR CLASS: Symbol not found for JsString>