(method: Required<Config>["method"])
| 179 | } |
| 180 | |
| 181 | const makeMethod = (method: Required<Config>["method"]) => { |
| 182 | const fn = (options: RequestOptions) => request({ ...options, method }) |
| 183 | fn.sse = async (options: RequestOptions) => { |
| 184 | const { opts, url } = await beforeRequest(options) |
| 185 | return createSseClient({ |
| 186 | ...opts, |
| 187 | body: opts.body as BodyInit | null | undefined, |
| 188 | headers: opts.headers as unknown as Record<string, string>, |
| 189 | method, |
| 190 | url, |
| 191 | }) |
| 192 | } |
| 193 | return fn |
| 194 | } |
| 195 | |
| 196 | return { |
| 197 | buildUrl, |
no test coverage detected