MCPcopy Create free account
hub / github.com/anus-dev/ANUS / requestPost

Method requestPost

packages/core/src/code_assist/server.ts:140–157  ·  view source on GitHub ↗
(
    method: string,
    req: object,
    signal?: AbortSignal,
  )

Source from the content-addressed store, hash-verified

138 }
139
140 async requestPost<T>(
141 method: string,
142 req: object,
143 signal?: AbortSignal,
144 ): Promise<T> {
145 const res = await this.client.request({
146 url: this.getMethodUrl(method),
147 method: 'POST',
148 headers: {
149 'Content-Type': 'application/json',
150 ...this.httpOptions.headers,
151 },
152 responseType: 'json',
153 body: JSON.stringify(req),
154 signal,
155 });
156 return res.data as T;
157 }
158
159 async requestGet<T>(method: string, signal?: AbortSignal): Promise<T> {
160 const res = await this.client.request({

Callers

nothing calls this directly

Calls 1

getMethodUrlMethod · 0.95

Tested by

no test coverage detected