bandcamp-fetch/docs/api/classes/Fetcher.md
2023-10-28 20:55:26 +08:00

2.1 KiB

bandcamp-fetch / Fetcher

Class: Fetcher

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new Fetcher(params)

Parameters

Name Type
params FetcherParams

Defined in

lib/utils/Fetcher.ts:20

Accessors

get cookie(): undefined | null | string

Returns

undefined | null | string

Defined in

lib/utils/Fetcher.ts:33

Methods

fetch

fetch(url, jsonResponse, method?, payload?): Promise<any>

Parameters

Name Type
url string
jsonResponse true
method? FetchMethod
payload? Record<string, any>

Returns

Promise<any>

Defined in

lib/utils/Fetcher.ts:37

fetch(url, jsonResponse?, method?, payload?): Promise<string>

Parameters

Name Type
url string
jsonResponse? boolean
method? FetchMethod
payload? Record<string, any>

Returns

Promise<string>

Defined in

lib/utils/Fetcher.ts:38


setCookie

setCookie(value?): void

Parameters

Name Type
value? null | string

Returns

void

Defined in

lib/utils/Fetcher.ts:25