Response.formData()
The formData()
method of the Response
interface takes a Response
stream and reads it to completion. It returns 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 response body has already been consumed.
SyntaxError
- : Thrown if the response's content type is not
multipart/form-data
orapplication/x-www-form-urlencoded
, or if the content cannot be parsed as form data.
- : Thrown if the response's content type is not