(path: string, value: string)
| 20 | }, |
| 21 | |
| 22 | async write(path: string, value: string): Promise<void> { |
| 23 | const response = await client.fetch(`${base}/${path}`, { |
| 24 | method: "PUT", |
| 25 | body: value, |
| 26 | headers: { |
| 27 | "Content-Type": "application/json", |
| 28 | }, |
| 29 | }) |
| 30 | if (!response.ok) throw new Error(`Failed to write ${path}: ${response.status}`) |
| 31 | }, |
| 32 | |
| 33 | async remove(path: string): Promise<void> { |
| 34 | const response = await client.fetch(`${base}/${path}`, { |