(path: string, body?: unknown)
| 138 | |
| 139 | /** 绑定当前 epoch 的 POST:被 abortAnalyticsRequests() 取消时静默作废。 */ |
| 140 | export function analyticsPost<T>(path: string, body?: unknown): Promise<T> { |
| 141 | return post<T>(path, body, _analyticsController.signal).catch((err) => { |
| 142 | if (isAbortError(err)) return neverSettle<T>() |
| 143 | throw err |
| 144 | }) |
| 145 | } |
| 146 | |
| 147 | export async function del<T = boolean>(path: string): Promise<T> { |
| 148 | const resp = await fetch(`${_baseUrl}${path}`, { |
nothing calls this directly
no test coverage detected