* POST that returns the raw Response (for streaming). Timeout is disabled * automatically.
(
path: string,
body: unknown,
opts?: RequestOptions
)
| 252 | * automatically. |
| 253 | */ |
| 254 | async postStream( |
| 255 | path: string, |
| 256 | body: unknown, |
| 257 | opts?: RequestOptions |
| 258 | ): Promise<Response> { |
| 259 | const res = await this.request(path, { |
| 260 | method: "POST", |
| 261 | body: JSON.stringify(body), |
| 262 | signal: opts?.signal, |
| 263 | timeout: 0, |
| 264 | extraHeaders: opts?.headers, |
| 265 | }); |
| 266 | if (!res.ok) throw await toApiError(res); |
| 267 | return res; |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | export const apiClient = new ApiClient(); |
no test coverage detected