httpRequest
httpRequest: (
options: {
body?: unknown;
headers?: Record<string, string>;
method?: string;
url: string;
},
) => Promise<
{
body: unknown;
headers: Record<string, string>;
status: number;
statusText: string;
},
>
onWebSocketEvent
onWebSocketEvent: (
callback: (
event: {
code?: number;
data?: unknown;
error?: string;
id: string;
reason?: string;
type: "error" | "close" | "open" | "message";
},
) => void,
) => void
removeWebSocketEventListener
removeWebSocketEventListener: () => void
websocketClose
websocketClose: (
options: { code?: number; id: string; reason?: string },
) => Promise<{ success: boolean }>
websocketCloseRuntime
websocketCloseRuntime: (
options: { runtimeId: string },
) => Promise<{ success: boolean }>
websocketOpen
websocketOpen: (
options: {
headers?: Record<string, string>;
protocol?: string;
runtimeId?: string;
url: string;
},
) => Promise<{ id: string }>
websocketSend
websocketSend: (
options: { data: unknown; id: string },
) => Promise<{ success: boolean }>
Proxy API interface for HTTP and WebSocket communication.