Liking cljdoc? Tell your friends :D

web.fetch.Body

The Body mixin of the Fetch API represents the body of the response/request, you to declare what its content type is and how it should be

The Body mixin of the Fetch API represents the body of the response/request,
you to declare what its content type is and how it should be
raw docstring

array-buffercljs

(array-buffer this & args)

Method.

The arrayBuffer() method of the web.fetch.Body mixin takes web.fetch.Response stream and reads it to completion. It returns promise that resolves with an js.ArrayBuffer.

response.arrayBuffer().then(function(buffer) { // do something with buffer });

See also: https://developer.mozilla.org/en-US/docs/Web/API/Body/arrayBuffer

Method.

The arrayBuffer() method of the `web.fetch.Body` mixin takes
`web.fetch.Response` stream and reads it to completion. It returns
promise that resolves with an `js.ArrayBuffer`.

`response.arrayBuffer().then(function(buffer) {
// do something with buffer
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Body/arrayBuffer`
sourceraw docstring

blobcljs

(blob this & args)

Method.

The blob() method of the web.fetch.Body mixin takes a web.fetch.Response and reads it to completion. It returns a promise that resolves a web.files.Blob.

response.blob().then(function(myBlob) { // do something with myBlob });

See also: https://developer.mozilla.org/en-US/docs/Web/API/Body/blob

Method.

The blob() method of the `web.fetch.Body` mixin takes a `web.fetch.Response`
and reads it to completion. It returns a promise that resolves
a `web.files.Blob`.

`response.blob().then(function(myBlob) {
// do something with myBlob
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Body/blob`
sourceraw docstring

bodycljs

(body this)

Property.

The body read-only property of the web.fetch.Body mixin is simple getter used to expose a web.files.ReadableStream of body contents.

var stream = responseInstance.body;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Body/body

Property.

The body read-only property of the `web.fetch.Body` mixin is
simple getter used to expose a `web.files.ReadableStream` of
body contents.

`var stream = responseInstance.body;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Body/body`
sourceraw docstring

body-usedcljs

(body-used this)

Property.

The bodyUsed read-only property of the web.fetch.Body mixin a js.Boolean that indicates whether the body has been read

var myBodyUsed = response.bodyUsed;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Body/bodyUsed

Property.

The bodyUsed read-only property of the `web.fetch.Body` mixin
a `js.Boolean` that indicates whether the body has been read

`var myBodyUsed = response.bodyUsed;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Body/bodyUsed`
sourceraw docstring

form-datacljs

(form-data this & args)

Method.

The formData() method of the web.fetch.Body mixin takes a web.fetch.Response and reads it to completion. It returns a promise that resolves a web.FormData object.

response.formData() .then(function(formdata) { // do something with your formdata });

See also: https://developer.mozilla.org/en-US/docs/Web/API/Body/formData

Method.

The formData() method of the `web.fetch.Body` mixin takes a `web.fetch.Response`
and reads it to completion. It returns a promise that resolves
a `web.FormData` object.

`response.formData()
.then(function(formdata) {
// do something with your formdata
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Body/formData`
sourceraw docstring

jsoncljs

(json this & args)

Method.

The json() method of the web.fetch.Body mixin takes a web.fetch.Response and reads it to completion. It returns a promise that resolves the result of parsing the body text as js.JSON.

response.json().then(data => { // do something with your data });

See also: https://developer.mozilla.org/en-US/docs/Web/API/Body/json

Method.

The json() method of the `web.fetch.Body` mixin takes a `web.fetch.Response`
and reads it to completion. It returns a promise that resolves
the result of parsing the body text as `js.JSON`.

`response.json().then(data => {
// do something with your data
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Body/json`
sourceraw docstring

set-body!cljs

(set-body! this val)

Property.

The body read-only property of the web.fetch.Body mixin is simple getter used to expose a web.files.ReadableStream of body contents.

var stream = responseInstance.body;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Body/body

Property.

The body read-only property of the `web.fetch.Body` mixin is
simple getter used to expose a `web.files.ReadableStream` of
body contents.

`var stream = responseInstance.body;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Body/body`
sourceraw docstring

set-body-used!cljs

(set-body-used! this val)

Property.

The bodyUsed read-only property of the web.fetch.Body mixin a js.Boolean that indicates whether the body has been read

var myBodyUsed = response.bodyUsed;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Body/bodyUsed

Property.

The bodyUsed read-only property of the `web.fetch.Body` mixin
a `js.Boolean` that indicates whether the body has been read

`var myBodyUsed = response.bodyUsed;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Body/bodyUsed`
sourceraw docstring

textcljs

(text this & args)

Method.

The text() method of the web.fetch.Body mixin takes a web.fetch.Response and reads it to completion. It returns a promise that resolves a web.USVString object (text). The response is always decoded UTF-8.

response.text().then(function (text) { // do something with the text response });

See also: https://developer.mozilla.org/en-US/docs/Web/API/Body/text

Method.

The text() method of the `web.fetch.Body` mixin takes a `web.fetch.Response`
and reads it to completion. It returns a promise that resolves
a `web.USVString` object (text). The response is always decoded
UTF-8.

`response.text().then(function (text) {
// do something with the text response
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Body/text`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close