Skip to content

Interface: NetworkRequestOptions

Defined in: packages/sdk/src/network-service.ts:39

Options for NetworkService.fetch and NetworkService.fetchHeaders.

Properties

method?

ts
optional method?: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "PATCH";

Defined in: packages/sdk/src/network-service.ts:44

HTTP method. Defaults to "GET" for NetworkService.fetch and "HEAD" for NetworkService.fetchHeaders.


headers?

ts
optional headers?: Record<string, string>;

Defined in: packages/sdk/src/network-service.ts:46

Request headers to send.


body?

ts
optional body?: string | ArrayBuffer | Uint8Array<ArrayBufferLike>;

Defined in: packages/sdk/src/network-service.ts:52

Request body. A string is sent as-is; an ArrayBuffer / Uint8Array is sent as raw bytes (e.g. uploading a file). Only meaningful for methods that carry a body.


followRedirects?

ts
optional followRedirects?: boolean;

Defined in: packages/sdk/src/network-service.ts:54

Follow HTTP redirects. Defaults to true.


timeoutMs?

ts
optional timeoutMs?: number;

Defined in: packages/sdk/src/network-service.ts:56

Request timeout in milliseconds. Omit for the platform default (~30 s).