MCPcopy Create free account
hub / github.com/oakserver/oak / respond

Method respond

http_server_native_request.ts:110–116  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

108 }
109
110 respond(response: Response): void {
111 if (this.#resolved) {
112 throw new Error("Request already responded to.");
113 }
114 this.#resolved = true;
115 this.#resolve(response);
116 }
117
118 upgrade(options?: UpgradeWebSocketOptions): WebSocket {
119 if (this.#resolved) {

Callers 1

fnFunction · 0.95

Calls

no outgoing calls

Tested by 1

fnFunction · 0.76