Documentation / @imvu/rest / RESTOptions
Interface: RESTOptions
Defined in: packages/rest/src/rest.ts:32
Properties
baseURL?
baseURL?: string;Defined in: packages/rest/src/rest.ts:34
API base URL. Defaults to https://api.imvu.com.
cookiePath?
cookiePath?: string;Defined in: packages/rest/src/rest.ts:36
Cookie file used by the default Node storage. Defaults to ./cookies.json.
cookieStorage?
cookieStorage?: CookieStorage | null;Defined in: packages/rest/src/rest.ts:42
Where the session's cookies persist. Defaults to a JSON file at cookiePath outside browsers; null keeps them in memory only. Ignored in browsers, which manage cookies themselves.
fetch?
fetch?: {
(input, init?): Promise<Response>;
(input, init?): Promise<Response>;
};Defined in: packages/rest/src/rest.ts:44
The fetch implementation to use. Defaults to the global fetch.
Call Signature
(input, init?): Promise<Response>;Parameters
| Parameter | Type |
|---|---|
input | RequestInfo | URL |
init? | RequestInit |
Returns
Promise<Response>
Call Signature
(input, init?): Promise<Response>;Parameters
| Parameter | Type |
|---|---|
input | string | Request | URL |
init? | RequestInit |
Returns
Promise<Response>
maxPowRetries?
maxPowRetries?: number;Defined in: packages/rest/src/rest.ts:52
Times one request may be retried after solving challenges. Defaults to 3.
onResponse?
onResponse?: (response) => void;Defined in: packages/rest/src/rest.ts:54
See REST.onResponse.
Parameters
| Parameter | Type |
|---|---|
response | APISuccessResponse |
Returns
void
proofOfWork?
proofOfWork?: ProofOfWorkSolver;Defined in: packages/rest/src/rest.ts:50
Solves proof-of-work challenges, so requests rejected with VERIFY-001 can be retried (see REST.solveChallenges). Without one, VERIFY-001 throws like any other API error. @imvu/client supplies an RSW solver by default.