MCPcopy Create free account
hub / github.com/OperationT00/T-Code / requestJson

Method requestJson

clients/t-code-cli/src/runtime-client.ts:77–86  ·  view source on GitHub ↗
(path: string, init: RequestInit)

Source from the content-addressed store, hash-verified

75 }
76
77 private async requestJson(path: string, init: RequestInit): Promise<Record<string, unknown>> {
78 const response = await fetch(`${this.baseUrl}${path}`, {
79 ...init,
80 headers: this.headers(),
81 });
82 if (!response.ok) {
83 throw await runtimeApiError(response);
84 }
85 return await response.json() as Record<string, unknown>;
86 }
87
88 private headers(): Record<string, string> {
89 return {

Callers 4

createThreadMethod · 0.95
submitTurnMethod · 0.95
pendingApprovalsMethod · 0.95
resolveApprovalMethod · 0.95

Calls 3

headersMethod · 0.95
runtimeApiErrorFunction · 0.85
jsonMethod · 0.45

Tested by

no test coverage detected