Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/ext/fetch/lib.deno_fetch.d.ts>FormData

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface FormData
implements DomIterable<string, FormDataEntryValue>
import { type FormData } from "https://deno.land/x/deno@v1.39.0/ext/fetch/lib.deno_fetch.d.ts";

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

Methods

append(
name: string,
value: string | Blob,
fileName?: string,
): void
delete(name: string): void
get(name: string): FormDataEntryValue | null
getAll(name: string): FormDataEntryValue[]
has(name: string): boolean
set(
name: string,
value: string | Blob,
fileName?: string,
): void
variable FormData
import { FormData } from "https://deno.land/x/deno@v1.39.0/ext/fetch/lib.deno_fetch.d.ts";

type

{ readonly prototype: FormData; new (): FormData; }