MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / request

Method request

projects/runtime-client/src/client.ts:67–74  ·  view source on GitHub ↗
(method: string, params?: unknown)

Source from the content-addressed store, hash-verified

65 constructor(private readonly options: RuntimeClientOptions) {}
66
67 async request<T>(method: string, params?: unknown): Promise<T> {
68 await this.connect()
69
70 const socket = this.socket
71 if (!socket || socket.readyState !== WebSocket.OPEN) throw new Error("Runtime socket is not connected")
72
73 return this.sendRequest<T>(socket, method, params)
74 }
75
76 private sendRequest<T>(socket: WebSocket, method: string, params?: unknown): Promise<T> {
77 const id = this.nextId++

Callers

nothing calls this directly

Calls 2

connectMethod · 0.95
sendRequestMethod · 0.95

Tested by

no test coverage detected