FormData

open external class FormData(form: EventTarget = definedExternally, submitter: EventTarget? = definedExternally) : MapLike<String, FormDataEntryValue> (source)

Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".

MDN Reference

Constructors

Link copied to clipboard
constructor(form: EventTarget = definedExternally, submitter: EventTarget? = definedExternally)

Functions

Link copied to clipboard
fun append(name: String, value: String)
fun append(name: String, value: Blob)
fun append(name: String, blobValue: Blob, filename: String = definedExternally)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun forEach(action: (FormDataEntryValue, key: String) -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open inline operator fun iterator(): Iterator<JsTuple2<String, FormDataEntryValue>>
Link copied to clipboard
open override fun keys(): JsIterator<String>
Link copied to clipboard
operator fun set(name: String, value: String)
operator fun set(name: String, value: Blob)
fun set(name: String, blobValue: Blob, filename: String = definedExternally)
Link copied to clipboard
open override fun values(): JsIterator<FormDataEntryValue>