Module: Confetch

Confetch

Methods

confetch (info)object inner

Create a confetch instance which can be sent or aborted
Name Type Description
info object
Returns:
Type Description
object

configure (baseUrl, headers, timeoutDuration, debug) Deprecated inner

Configure parameters for all confetch requests
Name Type Description
baseUrl string If you want to send requests on https://www.your.domain/abc, your baseUrl is https://www.your.domain.
headers object Same as headers option passed in fetch: for more information, check: Supplying request options to fetch.
timeoutDuration number Timeout duration in millis, for 3 secs, it'll be 3000.
debug boolean default: false, set it to true if you want some logs.

configureConfetch (baseUrl, headers, timeoutDuration, debug) inner

Configure parameters for all confetch requests
Name Type Description
baseUrl string If you want to send requests on https://www.your.domain/abc, your baseUrl is https://www.your.domain.
headers object Same as headers option passed in fetch: for more information, check: Supplying request options to fetch.
timeoutDuration number Timeout duration in millis, for 3 secs, it'll be 3000.
debug boolean default: false, set it to true if you want some logs.

getConfetchConfiguration ()object inner

Returns current configuration of confetch requests
Returns:
Type Description
object current configuration of confetch requests

getCurrentGlobalConfiguration ()object Deprecated inner

Returns current configuration of confetch requests
Returns:
Type Description
object current configuration of confetch requests