MCPcopy Create free account
hub / github.com/anomalyco/opencode / request

Function request

packages/core/src/tool/webfetch.ts:82–83  ·  view source on GitHub ↗
(url: string, format: Format, userAgent = browserUserAgent)

Source from the content-addressed store, hash-verified

80}
81
82const request = (url: string, format: Format, userAgent = browserUserAgent) =>
83 HttpClientRequest.get(url).pipe(HttpClientRequest.setHeaders(headers(format, userAgent)))
84
85const assertHttpUrl = (url: URL) => {
86 if (url.protocol !== "http:" && url.protocol !== "https:") throw new Error("URL must use http:// or https://")

Callers 1

executeFunction · 0.70

Calls 2

headersFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected