body
- body
- Body ⏏
- new Body([body])
- .text() ⇒
Promise.<String>
- .json() ⇒
Promise.<Object>
- .formData() ⇒
Promise.<FormData>
- Body ⏏
Body ⏏
Body mixin representing the body of a request or response. A body can be used through one of the class methods after which is can not be used again.
new Body([body])
Param | Type | Default |
---|---|---|
[body] | String | FormData | '' |
body.text() ⇒ Promise.<String>
Uses body and returns a Promise that resolves the body.
Kind: instance method of [Body](#exp_module_body--Body)
body.json() ⇒ Promise.<Object>
Uses body and returns a Promise that resolves a parsed JSON object from the body.
Kind: instance method of [Body](#exp_module_body--Body)
body.formData() ⇒ Promise.<FormData>
Uses body and returns a Promise that resolves an instance of FormData.
Kind: instance method of [Body](#exp_module_body--Body)