(path: string, init?: RequestInit)
| 19 | ) |
| 20 | |
| 21 | export function request(path: string, init?: RequestInit) { |
| 22 | const url = new URL(path, "http://localhost") |
| 23 | return HttpClientRequest.fromWeb(new Request(url, init)).pipe( |
| 24 | HttpClientRequest.setUrl(url.pathname), |
| 25 | HttpClient.execute, |
| 26 | ) |
| 27 | } |
| 28 | |
| 29 | export function requestInDirectory(path: string, directory: string, init: RequestInit = {}) { |
| 30 | const headers = new Headers(init.headers) |
no outgoing calls