(body: RequestBody)
| 623 | } |
| 624 | |
| 625 | private convertBody(body: RequestBody): string | null { |
| 626 | if (body === null || body === undefined) return null; |
| 627 | if (typeof body === 'string') return body; |
| 628 | if (typeof body === 'object') return JSON.stringify(body); |
| 629 | return String(body); |
| 630 | } |
| 631 | |
| 632 | private convertUrl(url: URL | string): string { |
| 633 | return url instanceof URL ? url.toString() : url; |