(bytes: Uint8Array)
| 31 | } |
| 32 | |
| 33 | function encodeBytesToBase64(bytes: Uint8Array): string { |
| 34 | let bin = ""; |
| 35 | for (let i = 0; i < bytes.length; i++) bin += String.fromCharCode(bytes[i]); |
| 36 | return btoa(bin); |
| 37 | } |
| 38 | |
| 39 | function sanitizeHeaders(h: unknown): Record<string, string> { |
| 40 | const out: Record<string, string> = {}; |