(input: RequestInfo | URL, init?: RequestInit)
| 65 | const request = (path: string, init?: RequestInit) => new Request(`${origin}${path}`, init); |
| 66 | |
| 67 | const workerFetch = (input: RequestInfo | URL, init?: RequestInit): Promise<Response> => { |
| 68 | const nextRequest = |
| 69 | input instanceof Request ? new Request(input, init) : new Request(input, init); |
| 70 | return worker.fetch(nextRequest); |
| 71 | }; |
| 72 | |
| 73 | const base64url = (buffer: ArrayBuffer): string => { |
| 74 | const bytes = new Uint8Array(buffer); |