MCPcopy Index your code
hub / github.com/anomalyco/opencode / request

Function request

packages/opencode/test/server/httpapi-layer.ts:21–27  ·  view source on GitHub ↗
(path: string, init?: RequestInit)

Source from the content-addressed store, hash-verified

19)
20
21export 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
29export function requestInDirectory(path: string, directory: string, init: RequestInit = {}) {
30 const headers = new Headers(init.headers)

Callers 6

requestAuthorizeFunction · 0.90
requestCallbackFunction · 0.90
requestInDirectoryFunction · 0.70
captureThrownFunction · 0.70

Calls

no outgoing calls

Tested by 3

requestAuthorizeFunction · 0.72
requestCallbackFunction · 0.72
captureThrownFunction · 0.56