Liking cljdoc? Tell your friends :D

web.fetch.Headers

The Headers interface of the Fetch API allows you to perform actions on HTTP request and response headers. These actions include setting, adding to, and removing. A Headers object has an associated list, which is initially empty and consists of zero or more name value pairs. You can add to this using methods like append() Examples.) In all methods of this interface, header names are by case-insensitive byte sequence.

The Headers interface of the Fetch API allows you to perform
actions on HTTP request and response headers. These actions include
setting, adding to, and removing. A Headers object has an associated
list, which is initially empty and consists of zero or more name
value pairs. You can add to this using methods like `append()`
Examples.) In all methods of this interface, header names are
by case-insensitive byte sequence.
raw docstring

appendcljs

(append this name value)

Method.

The append() method of the web.fetch.Headers interface appends new value onto an existing header inside a Headers object, or the header if it does not already exist.

myHeaders.append(name, value);

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

Method.

The append() method of the `web.fetch.Headers` interface appends
new value onto an existing header inside a Headers object, or
the header if it does not already exist.

`myHeaders.append(name, value);`

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

constructorcljs

Constructor.

The Headers() constructor creates a new web.fetch.Headers object.

init Optional An object containing any HTTP headers that you want to pre-populate your Headers object with. This can be a simple object literal with web.ByteString values; or an existing Headers object. In the last case, the new Headers object inherits its data from the existing Headers object.

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

Constructor.

The Headers() constructor creates a new `web.fetch.Headers` object.

init Optional
An object containing any HTTP headers that you want to pre-populate your Headers object with. This can be a simple object literal with `web.ByteString` values; or an existing Headers object. In the last case, the new Headers object inherits its data from the existing Headers object.

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

deletecljs

(delete this name)

Method.

The delete() method of the web.fetch.Headers interface deletes header from the current Headers object.

myHeaders.delete(name);

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

Method.

The delete() method of the `web.fetch.Headers` interface deletes
header from the current Headers object.

`myHeaders.delete(name);`

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

entriescljs

(entries this)

Method.

The Headers.entries() method returns an iterator allowing to through all key/value pairs contained in this object. The both key and value of each pairs are web.ByteString objects.

headers.entries();

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

Method.

The Headers.entries() method returns an `iterator` allowing to
through all key/value pairs contained in this object. The both
key and value of each pairs are `web.ByteString` objects.

`headers.entries();`

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

getcljs

(get this name)

Method.

The get() method of the web.fetch.Headers interface returns byte string of all the values of a header within a Headers object a given name. If the requested header doesn't exist in the Headers it returns null.

myHeaders.get(name);

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

Method.

The get() method of the `web.fetch.Headers` interface returns
byte string of all the values of a header within a Headers object
a given name. If the requested header doesn't exist in the Headers
it returns null.

`myHeaders.get(name);`

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

get-allcljs

(get-all this name)

Method.

The getAll() method of the web.fetch.Headers interface used return an array of all the values of a header within a Headers with a given name; in newer versions of the Fetch spec, it has deleted, and Headers.get() has been updated to fetch all header instead of only the first one.

myHeaders.getAll(name);

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

Method.

The getAll() method of the `web.fetch.Headers` interface used
return an array of all the values of a header within a Headers
with a given name; in newer versions of the Fetch spec, it has
deleted, and `Headers.get()` has been updated to fetch all header
instead of only the first one.

`myHeaders.getAll(name);`

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

hascljs

(has this name)

Method.

The has() method of the web.fetch.Headers interface returns boolean stating whether a Headers object contains a certain header.

myHeaders.has(name);

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

Method.

The has() method of the `web.fetch.Headers` interface returns
boolean stating whether a Headers object contains a certain header.

`myHeaders.has(name);`

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

keyscljs

(keys this)

Method.

The Headers.keys() method returns an iterator allowing to go all keys contained in this object. The keys are web.ByteString

headers.keys();

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

Method.

The Headers.keys() method returns an `iterator` allowing to go
all keys contained in this object. The keys are `web.ByteString`

`headers.keys();`

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

setcljs

(set this name value)

Method.

The set() method of the web.fetch.Headers interface sets a value for an existing header inside a Headers object, or adds header if it does not already exist.

myHeaders.set(name, value);

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

Method.

The set() method of the `web.fetch.Headers` interface sets a
value for an existing header inside a Headers object, or adds
header if it does not already exist.

`myHeaders.set(name, value);`

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

valuescljs

(values this)

Method.

The Headers.values() method returns an iterator allowing to through all values contained in this object. The values are web.ByteString

headers.values();

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

Method.

The Headers.values() method returns an `iterator` allowing to
through all values contained in this object. The values are `web.ByteString`

`headers.values();`

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

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

× close