MCPcopy Index your code
hub / github.com/codeaashu/claude-code / get

Method get

web/lib/api/client.ts:203–219  ·  view source on GitHub ↗

GET with request deduplication.

(path: string, opts?: RequestOptions)

Source from the content-addressed store, hash-verified

201
202 /** GET with request deduplication. */
203 async get<T>(path: string, opts?: RequestOptions): Promise<T> {
204 const key = path;
205 const existing = this.inflight.get(key);
206 if (existing) {
207 const res = await existing;
208 if (!res.ok) throw await toApiError(res.clone());
209 return res.clone().json() as Promise<T>;
210 }
211
212 const promise = this.request(path, { method: "GET", signal: opts?.signal });
213 this.inflight.set(key, promise);
214 promise.finally(() => this.inflight.delete(key));
215
216 const res = await promise;
217 if (!res.ok) throw await toApiError(res);
218 return res.json() as Promise<T>;
219 }
220
221 async post<T>(path: string, body: unknown, opts?: RequestOptions): Promise<T> {
222 const res = await this.request(path, {

Callers

nothing calls this directly

Calls 6

requestMethod · 0.95
toApiErrorFunction · 0.85
getMethod · 0.65
deleteMethod · 0.65
cloneMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected