Body object
The Body mixin is used to define the body of the response or request along with a content type.
Syntax
var body = new Body();
Members
The Body object has these types of members:
- Methods
- Properties
Methods
The Body object has these methods.
Method | Description |
---|---|
arrayBuffer | Takes a Response stream and returns a promise for an ArrayBuffer object. |
blob | Takes a Response stream and returns a promise for a Blob object. |
formData | Takes a Response stream and returns a promise for a FormData object. |
json | Takes a Response stream and returns a promise for an object containing JSON data. |
text | Takes a Response stream and returns a promise for a USVString object. |
Properties
The Body object has these properties.
Property | Access type | Description |
---|---|---|
Read-only |
Determines if the Body is non-null and its stream is distributed. |