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

Function request

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

Source from the content-addressed store, hash-verified

124 Effect.gen(function* () {
125 const dir = yield* tmpdirScoped({ git: true })
126 const request = (path: string, init?: RequestInit) =>
127 Effect.promise(() =>
128 HttpApiApp.webHandler().handler(
129 new Request(`http://localhost${path}`, {
130 ...init,
131 headers: { "x-opencode-directory": dir, "content-type": "application/json", ...init?.headers },
132 }),
133 handlerContext,
134 ),
135 )
136 const [permission, questionReply, questionReject] = yield* Effect.all(
137 [
138 request("/permission/invalid-permission-id/reply", {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected