Skip to content

IHttpOpts

Defined in: src/http-api/interface.ts:50

Options object for FetchHttpApi and DigitalWorldHttpApi.

optional accessToken?: string

Defined in: src/http-api/interface.ts:58


baseUrl: string

Defined in: src/http-api/interface.ts:53


optional extraParams?: QueryDict

Defined in: src/http-api/interface.ts:56


optional fetchFn?: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Defined in: src/http-api/interface.ts:51

(input, init?): Promise<Response>

MDN Reference

URL | RequestInfo

RequestInit

Promise<Response>

(input, init?): Promise<Response>

MDN Reference

string | URL | Request

RequestInit

Promise<Response>


optional idBaseUrl?: string

Defined in: src/http-api/interface.ts:54


optional localTimeoutMs?: number

Defined in: src/http-api/interface.ts:78


optional logger?: Logger

Defined in: src/http-api/interface.ts:81

Optional logger instance. If provided, requests and responses will be logged.


optional onlyData?: boolean

Defined in: src/http-api/interface.ts:76

For historical reasons, must be set to true. Will eventually be removed.


prefix: string

Defined in: src/http-api/interface.ts:55


optional refreshToken?: string

Defined in: src/http-api/interface.ts:62

Used in conjunction with tokenRefreshFunction to attempt token refresh


optional tokenRefreshFunction?: TokenRefreshFunction

Defined in: src/http-api/interface.ts:67

Function to attempt token refresh when a possibly expired token is encountered Optional, only called when a refreshToken is present


optional useAuthorizationHeader?: boolean

Defined in: src/http-api/interface.ts:73

Whether to use the HTTP Authorization header over the access_token query parameter