coderef

Fetch form dataLimited availability

The Request.formData() and Response.formData() methods read a request or response body and return a FormData promise. You can use it to access the fields of a form submission.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
✕Not supportedup to 155
Current: 155
Edge
✕Not supportedup to 154
Current: 154
Firefox
1–38Not supported
39+Supportedsince Jul 2, 2015
Current: 157
Safari
1–14Not supported
14.1+Supportedsince Apr 26, 2021
Current: 27
MobileChrome Android
✕Not supportedup to 155
Current: 155
Firefox Android
4–38Not supported
39+Supportedsince Jul 2, 2015
Current: 157
Safari iOS
1–14Not supported
14.5+Supportedsince Apr 26, 2021
Current: 27

How to use

Not supported in Chrome, Edge, Chrome Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: formData.

Feature detection

JS · check before using
if ("Request" in globalThis && "formData" in Request.prototype) {
  // Request.formData is available
}

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Request.formData✕✕3914.1✕3914.5
Response.formData✕✕3914.1✕3914.5