Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

FormData

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".

interface FormData {
[[Symbol.iterator]](): IterableIterator<[string, FormDataEntryValue]>;
append(
name: string,
value: string | Blob,
fileName?: string,
): void;
delete(name: string): void;
entries(): IterableIterator<[string, FormDataEntryValue]>;
forEach(callbackfn: (
key: string,
parent: FormData,
) => void
, thisArg?: any): void;
get(name: string): FormDataEntryValue | null;
getAll(name: string): FormDataEntryValue[];
has(name: string): boolean;
keys(): IterableIterator<string>;
set(
name: string,
value: string | Blob,
fileName?: string,
): void;
values(): IterableIterator<FormDataEntryValue>;
}
var FormData: {
prototype: FormData;
new (form?: HTMLFormElement): FormData;
}
;

§Methods

§
[[Symbol.iterator]](): IterableIterator<[string, FormDataEntryValue]>
[src]
§
append(
name: string,
value: string | Blob,
fileName?: string,
): void
[src]
§
delete(name: string): void
[src]
§
entries(): IterableIterator<[string, FormDataEntryValue]>
[src]

Returns an array of key, value pairs for every entry in the list.

§
forEach(callbackfn: (
key: string,
parent: FormData,
) => void
, thisArg?: any): void
[src]
§
get(name: string): FormDataEntryValue | null
[src]
§
getAll(name: string): FormDataEntryValue[]
[src]
§
has(name: string): boolean
[src]
§
keys(): IterableIterator<string>
[src]

Returns a list of keys in the list.

§
set(
name: string,
value: string | Blob,
fileName?: string,
): void
[src]
§
values(): IterableIterator<FormDataEntryValue>
[src]

Returns a list of values in the list.