FileBlob.formData method | Bun module | Bun
BuildDocsReferenceGuidesBlogDiscord/
Bun/
FileBlob/
formDataMformData
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
Bun/
FileBlob/
formDataMformData
method
FileBlob.formDataformData(): Promise
FormData>;
Read the data from the blob as a FormData object.
This first decodes the data from UTF-8, then parses it as a multipart/form-data body or a application/x-www-form-urlencoded body.
The type property of the blob is used to determine the format of the body.
This is a non-standard addition to the Blob API, to make it conform more closely to the BodyMixin API.
Referenced typesclass
FormDataProvides 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
[Symbol.iterator](): FormDataIterator[string, FormDataEntryValue]>;
append(name: string,value: string |
Blob): void;
MDN Reference
append(name: string,value: string): void;
append(name: string,blobValue:
Blob,filename?: string): void;
delete(name: string): void;
MDN Reference
entries(): FormDataIterator[string, FormDataEntryValue]>;
Returns an array of key, value pairs for every entry in the list.
entries(): IterableIterator[string, string]>;
forEach(callbackfn: (value:
FormDataEntryValue, key: string, parent:
FormData) => void,thisArg?: any): void;
get(name: string): null |
FormDataEntryValue;
MDN Reference
getAll(name: string):
FormDataEntryValue[];
MDN Reference
has(name: string): boolean;
MDN Reference
keys(): FormDataIteratorstring>;
Returns a list of keys in the list.
keys(): IterableIteratorstring>;
set(name: string,value: string |
Blob): void;
MDN Reference
set(name: string,value: string): void;
set(name: string,blobValue:
Blob,filename?: string): void;
values(): FormDataIteratorFormDataEntryValue>;
Returns a list of values in the list.
values(): IterableIteratorstring>;
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →