Liking cljdoc? Tell your friends :D

web.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.Body mixin takes a web.Response and reads it to completion. It returns a promise that resolves an web.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.Body` mixin takes a `web.Response`
and reads it to completion. It returns a promise that resolves
an `web.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.Body mixin takes a web.Response and reads it to completion. It returns a promise that resolves a web.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.Body` mixin takes a `web.Response`
and reads it to completion. It returns a promise that resolves
a `web.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.Body mixin is a simple used to expose a web.ReadableStream of the 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.Body` mixin is a simple
used to expose a `web.ReadableStream` of the 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.Body mixin contains web.Boolean that indicates whether the body has been read yet.

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.Body` mixin contains
`web.Boolean` that indicates whether the body has been read yet.

`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.Response interface creates a of a response object, identical in every way, but stored in a 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.Response` interface creates a
of a response object, identical in every way, but stored in a
variable.

`var response2 = response1.clone();`

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

constructorcljs

Constructor.

The Response() constructor creates a new web.Response object.

body Optional An object defining a body for the response. This can be null, or one of:

web.Blob web.BufferSource web.FormData web.ReadableStream web.URLSearchParams web.USVString

init Optional An options object containing any custom settings that you want to apply to the response. The possible options are:

status: The status code for the reponse, e.g., 200. statusText: The status message associated with the status code, e.g., OK. headers: Any headers you want to add to your response, contained within a web.Headers object or object literal of web.ByteString key/value pairs (see HTTP headers for a reference).

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

Constructor.

The Response() constructor creates a new `web.Response` object.

body Optional
An object defining a body for the response. This can be null, or one of:

`web.Blob`
`web.BufferSource`
`web.FormData`
`web.ReadableStream`
`web.URLSearchParams`
`web.USVString`


init Optional
An options object containing any custom settings that you want to apply to the response. The possible options are:

status: The status code for the reponse, e.g., 200.
statusText: The status message associated with the status code, e.g., OK.
headers: Any headers you want to add to your response, contained within a `web.Headers` object or object literal of `web.ByteString` key/value pairs (see HTTP headers for a reference).

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

errorcljs

(error this)

Method.

The error() method of the web.Response interface returns a 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.Response` interface returns a
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.Body mixin takes a web.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.Body` mixin takes a `web.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.

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

var myHeaders = response.headers;

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

Property.

The headers read-only property of the `web.Response` interface
the `web.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.Body mixin takes a web.Response and reads it to completion. It returns a promise that resolves the result of parsing the body text as web.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.Body` mixin takes a `web.Response`
and reads it to completion. It returns a promise that resolves
the result of parsing the body text as `web.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.

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

var myOK = response.ok;

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

Property.

The ok read-only property of the `web.Response` interface contains
Boolean stating whether the response was successful (status in
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.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.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.

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

var isRedirected = Response.redirected;

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

Property.

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

`var isRedirected = Response.redirected;`

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

set-body!cljs

(set-body! this val)

Property.

The body read-only property of the web.Body mixin is a simple used to expose a web.ReadableStream of the 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.Body` mixin is a simple
used to expose a `web.ReadableStream` of the 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.Body mixin contains web.Boolean that indicates whether the body has been read yet.

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.Body` mixin contains
`web.Boolean` that indicates whether the body has been read yet.

`var myBodyUsed = response.bodyUsed;`

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

set-headers!cljs

(set-headers! this val)

Property.

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

var myHeaders = response.headers;

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

Property.

The headers read-only property of the `web.Response` interface
the `web.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

set-ok!cljs

(set-ok! this val)

Property.

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

var myOK = response.ok;

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

Property.

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

`var myOK = response.ok;`

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

set-status!cljs

(set-status! this val)

Property.

The status read-only property of the web.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.

The status read-only property of the `web.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

set-status-text!cljs

(set-status-text! this val)

Property.

The statusText read-only property of the web.Response interface the status message corresponding to the status code (e.g., OK 200).

var myStatusText = response.statusText;

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

Property.

The statusText read-only property of the `web.Response` interface
the status message corresponding to the status code (e.g., OK
200).

`var myStatusText = response.statusText;`

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

set-type!cljs

(set-type! this val)

Property.

The type read-only property of the web.Response interface contains 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.

The type read-only property of the `web.Response` interface contains
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

set-url!cljs

(set-url! this val)

Property.

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

var myURL = response.url;

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

Property.

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

`var myURL = response.url;`

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

set-use-final-url!cljs

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

Property.

The useFinalURL property of the web.Response interface contains 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.

The useFinalURL property of the `web.Response` interface contains
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.

The status read-only property of the web.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.

The status read-only property of the `web.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.

The statusText read-only property of the web.Response interface the status message corresponding to the status code (e.g., OK 200).

var myStatusText = response.statusText;

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

Property.

The statusText read-only property of the `web.Response` interface
the status message corresponding to the status code (e.g., OK
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.Body mixin takes a web.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.Body` mixin takes a `web.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.

The type read-only property of the web.Response interface contains 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.

The type read-only property of the `web.Response` interface contains
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.

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

var myURL = response.url;

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

Property.

The url read-only property of the `web.Response` interface contains
URL of the response. The value of the url property will be the
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.

The useFinalURL property of the web.Response interface contains 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.

The useFinalURL property of the `web.Response` interface contains
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