Request.formData()
The formData() method of the Request interface reads the request body and returns it as a promise that resolves with a FormData object.
Syntax
formData()
Parameters
None.
Return value
A Promise that resolves with a FormData object.
Exceptions
TypeError- : Thrown if the request body has already been used or if the request's method is
GETorHEAD.
- : Thrown if the request body has already been used or if the request's method is
SyntaxError- : Thrown if the request's content type is not
multipart/form-dataorapplication/x-www-form-urlencoded, or if the content cannot be parsed as form data.
- : Thrown if the request's content type is not