Skip to content

Documentation / @imvu/rest / RESTOptions

Interface: RESTOptions ​

Defined in: packages/rest/src/rest.ts:32

Properties ​

baseURL? ​

ts
baseURL?: string;

Defined in: packages/rest/src/rest.ts:34

API base URL. Defaults to https://api.imvu.com.


cookiePath? ​

ts
cookiePath?: string;

Defined in: packages/rest/src/rest.ts:36

Cookie file used by the default Node storage. Defaults to ./cookies.json.


cookieStorage? ​

ts
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? ​

ts
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 ​

ts
(input, init?): Promise<Response>;

MDN Reference

Parameters ​
ParameterType
inputRequestInfo | URL
init?RequestInit
Returns ​

Promise<Response>

Call Signature ​

ts
(input, init?): Promise<Response>;

MDN Reference

Parameters ​
ParameterType
inputstring | Request | URL
init?RequestInit
Returns ​

Promise<Response>


maxPowRetries? ​

ts
maxPowRetries?: number;

Defined in: packages/rest/src/rest.ts:52

Times one request may be retried after solving challenges. Defaults to 3.


onResponse? ​

ts
onResponse?: (response) => void;

Defined in: packages/rest/src/rest.ts:54

See REST.onResponse.

Parameters ​

ParameterType
responseAPISuccessResponse

Returns ​

void


proofOfWork? ​

ts
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.

Released under the MIT License.