bandcamp-fetch/docs/api/classes/Fetcher.md
2023-10-30 01:25:17 +08:00

2.5 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:21

Accessors

get cookie(): undefined | null | string

Returns

undefined | null | string

Defined in

lib/utils/Fetcher.ts:34

Methods

fetch

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

Parameters

Name Type
url string
jsonResponse false
method HEAD
payload? undefined

Returns

Promise<Response>

Defined in

lib/utils/Fetcher.ts:38

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:39

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:40


setCookie

setCookie(value?): void

Parameters

Name Type
value? null | string

Returns

void

Defined in

lib/utils/Fetcher.ts:26