(id: string, path: string, body: string)
| 50 | } |
| 51 | |
| 52 | async function write(id: string, path: string, body: string): Promise<void> { |
| 53 | const url = new URL("http://test/write"); |
| 54 | url.searchParams.set("id", id); |
| 55 | url.searchParams.set("path", path); |
| 56 | const res = await SELF.fetch(url, { method: "POST", body }); |
| 57 | if (!res.ok) throw new Error(`write failed: ${res.status} ${await res.text()}`); |
| 58 | } |
| 59 | |
| 60 | async function read(id: string, path: string): Promise<string> { |
| 61 | const url = new URL("http://test/read"); |
no test coverage detected