Liking cljdoc? Tell your friends :D

web.fetch.Response

The Response interface of the Fetch API represents the response a request.

The Response interface of the Fetch API represents the response
a request.
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.

[Read Only] [Experimental]

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.

[Read Only]
[Experimental]

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.

[Read Only]

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.

[Read Only]

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

clonecljs

(clone this)

Method.

The clone() method of the web.fetch.Response interface creates clone of a response object, identical in every way, but stored a different variable.

var response2 = response1.clone();

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/clone

Method.

The clone() method of the `web.fetch.Response` interface creates
clone of a response object, identical in every way, but stored
a different variable.

`var response2 = response1.clone();`

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

errorcljs

(error this)

Method.

The error() method of the web.fetch.Response interface returns new Response object associated with a network error.

var errorResponse = Response.error();

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/error

Method.

The error() method of the `web.fetch.Response` interface returns
new Response object associated with a network error.

`var errorResponse = Response.error();`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Response/error`
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

headerscljs

(headers this)

Property.

[Read Only]

The headers read-only property of the web.fetch.Response interface the web.fetch.Headers object associated with the response.

var myHeaders = response.headers;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/headers

Property.

[Read Only]

The headers read-only property of the `web.fetch.Response` interface
the `web.fetch.Headers` object associated with the response.

`var myHeaders = response.headers;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Response/headers`
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

okcljs

(ok this)

Property.

[Read Only]

The ok read-only property of the web.fetch.Response interface a Boolean stating whether the response was successful (status the range 200-299) or not.

var myOK = response.ok;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/ok

Property.

[Read Only]

The ok read-only property of the `web.fetch.Response` interface
a Boolean stating whether the response was successful (status
the range 200-299) or not.

`var myOK = response.ok;`

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

redirectcljs

(redirect this url status)

Method.

The redirect() method of the web.fetch.Response interface returns Response resulting in a redirect to the specified URL.

var response = Response.redirect(url, status);

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/redirect

Method.

The redirect() method of the `web.fetch.Response` interface returns
Response resulting in a redirect to the specified URL.

`var response = Response.redirect(url, status);`

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

redirectedcljs

(redirected this)

Property.

[Read Only]

The read-only redirected property of the web.fetch.Response indicates whether or not the response is the result of a request made which was redirected.

var isRedirected = Response.redirected;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/redirected

Property.

[Read Only]

The read-only redirected property of the `web.fetch.Response`
indicates whether or not the response is the result of a request
made which was redirected.

`var isRedirected = Response.redirected;`

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

set-use-final-url!cljs

(set-use-final-url! this val)

Property.

[Obsolute]

The useFinalURL property of the web.fetch.Response interface a boolean stating whether this is the final URL of the response.

var isfinalURL = Response.useFinalURL;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/useFinalURL

Property.

[Obsolute]

The useFinalURL property of the `web.fetch.Response` interface
a boolean stating whether this is the final URL of the response.

`var isfinalURL = Response.useFinalURL;`

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

statuscljs

(status this)

Property.

[Read Only]

The status read-only property of the web.fetch.Response interface the status code of the response (e.g., 200 for a success).

var myStatus = response.status;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/status

Property.

[Read Only]

The status read-only property of the `web.fetch.Response` interface
the status code of the response (e.g., 200 for a success).

`var myStatus = response.status;`

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

status-textcljs

(status-text this)

Property.

[Read Only]

The statusText read-only property of the web.fetch.Response contains the status message corresponding to the status code OK for 200).

var myStatusText = response.statusText;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/statusText

Property.

[Read Only]

The statusText read-only property of the `web.fetch.Response`
contains the status message corresponding to the status code
OK for 200).

`var myStatusText = response.statusText;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Response/statusText`
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

typecljs

(type this)

Property.

[Read Only]

The type read-only property of the web.fetch.Response interface the type of the response. It can be one of the following:

var myType = response.type;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/type

Property.

[Read Only]

The type read-only property of the `web.fetch.Response` interface
the type of the response. It can be one of the following:

`var myType = response.type;`

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

urlcljs

(url this)

Property.

[Read Only]

The url read-only property of the web.fetch.Response interface the URL of the response. The value of the url property will be final URL obtained after any redirects.

var myURL = response.url;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/url

Property.

[Read Only]

The url read-only property of the `web.fetch.Response` interface
the URL of the response. The value of the url property will be
final URL obtained after any redirects.

`var myURL = response.url;`

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

use-final-urlcljs

(use-final-url this)

Property.

[Obsolute]

The useFinalURL property of the web.fetch.Response interface a boolean stating whether this is the final URL of the response.

var isfinalURL = Response.useFinalURL;

See also: https://developer.mozilla.org/en-US/docs/Web/API/Response/useFinalURL

Property.

[Obsolute]

The useFinalURL property of the `web.fetch.Response` interface
a boolean stating whether this is the final URL of the response.

`var isfinalURL = Response.useFinalURL;`

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

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

× close