Interface FormData
interface FormData {
"[iterator]"(): FormDataIterator<[string, FormDataEntryValue]>;
append(name: string, value: string | Blob): void;
append(name: string, value: string): void;
append(name: string, blobValue: Blob, filename?: string): void;
delete(name: string): void;
entries(): FormDataIterator<[string, FormDataEntryValue]>;
forEach(
callbackfn: (
value: FormDataEntryValue,
key: string,
parent: FormData,
) => void,
thisArg?: any,
): void;
get(name: string): FormDataEntryValue;
getAll(name: string): FormDataEntryValue[];
has(name: string): boolean;
keys(): FormDataIterator<string>;
set(name: string, value: string | Blob): void;
set(name: string, value: string): void;
set(name: string, blobValue: Blob, filename?: string): void;
values(): FormDataIterator<FormDataEntryValue>;
}
"[iterator]"(): FormDataIterator<[string, FormDataEntryValue]>;
append(name: string, value: string | Blob): void;
append(name: string, value: string): void;
append(name: string, blobValue: Blob, filename?: string): void;
delete(name: string): void;
entries(): FormDataIterator<[string, FormDataEntryValue]>;
forEach(
callbackfn: (
value: FormDataEntryValue,
key: string,
parent: FormData,
) => void,
thisArg?: any,
): void;
get(name: string): FormDataEntryValue;
getAll(name: string): FormDataEntryValue[];
has(name: string): boolean;
keys(): FormDataIterator<string>;
set(name: string, value: string | Blob): void;
set(name: string, value: string): void;
set(name: string, blobValue: Blob, filename?: string): void;
values(): FormDataIterator<FormDataEntryValue>;
}
Methods
[iterator]
- "[iterator]"(): FormDataIterator<[string, FormDataEntryValue]>
Returns FormDataIterator<[string, FormDataEntryValue]>
append
- append(name: string, value: string | Blob): void
Parameters
- name: string
- value: string | Blob
Returns void
- append(name: string, value: string): void
Parameters
- name: string
- value: string
Returns void
- append(name: string, blobValue: Blob, filename?: string): void
Parameters
- name: string
- blobValue: Blob
Optional
filename: string
Returns void
delete
entries
- entries(): FormDataIterator<[string, FormDataEntryValue]>
Returns an array of key, value pairs for every entry in the list.
Returns FormDataIterator<[string, FormDataEntryValue]>
forEach
- forEach(
callbackfn: (
value: FormDataEntryValue,
key: string,
parent: FormData,
) => void,
thisArg?: any,
): void Parameters
- callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void
Optional
thisArg: any
Returns void
get
- get(name: string): FormDataEntryValue
Parameters
- name: string
Returns FormDataEntryValue
getAll
- getAll(name: string): FormDataEntryValue[]
Parameters
- name: string
Returns FormDataEntryValue[]
has
keys
- keys(): FormDataIterator<string>
Returns a list of keys in the list.
Returns FormDataIterator<string>
set
- set(name: string, value: string | Blob): void
Parameters
- name: string
- value: string | Blob
Returns void
- set(name: string, value: string): void
Parameters
- name: string
- value: string
Returns void
- set(name: string, blobValue: Blob, filename?: string): void
Parameters
- name: string
- blobValue: Blob
Optional
filename: string
Returns void
values
- values(): FormDataIterator<FormDataEntryValue>
Returns a list of values in the list.
Returns FormDataIterator<FormDataEntryValue>
MDN Reference