Represents the configuration options for performing a Kos WebSocket fetch operation.

interface KosFetchOptions {
    method: "GET" | "POST" | "PUT" | "DELETE";
    body?: string | Uint8Array | ArrayBuffer | Blob | FormData;
    ordered?: boolean;
    destinationAddress?: string;
    tracker?: string;
    stream?: boolean;
    responseType?: "text" | "json" | "arraybuffer" | "blob";
}

Properties

method: "GET" | "POST" | "PUT" | "DELETE"

The HTTP method for the request (e.g., 'GET', 'POST', 'PUT', 'DELETE', etc.).

body?: string | Uint8Array | ArrayBuffer | Blob | FormData

The request body - can be string, ArrayBuffer, Blob, or FormData.

ordered?: boolean

Indicates whether the request should be ordered.

destinationAddress?: string

The destination address for the WebSocket request.

tracker?: string

The tracker associated with the request.

stream?: boolean

Enable streaming mode for large responses

responseType?: "text" | "json" | "arraybuffer" | "blob"

Response type hint for binary data handling