MCPcopy
hub / github.com/vercel/next.js / fetchViaHTTP

Function fetchViaHTTP

test/lib/next-test-utils.ts:193–201  ·  view source on GitHub ↗
(
  appPort: string | number,
  pathname: string,
  query?: Record<string, any> | string | null | undefined,
  opts?: RequestInit
)

Source from the content-addressed store, hash-verified

191}
192
193export function fetchViaHTTP(
194 appPort: string | number,
195 pathname: string,
196 query?: Record<string, any> | string | null | undefined,
197 opts?: RequestInit
198): Promise<Response> {
199 const url = query ? withQuery(pathname, query) : pathname
200 return fetch(getFullUrl(appPort, url), opts)
201}
202
203export function expectVaryHeaderToContain(
204 varyHeader: string | null,

Callers 15

runTestsFunction · 0.90
runTestsFunction · 0.90
runTestsFunction · 0.90
runTestsFunction · 0.90
index.test.tsFile · 0.90
runTestsFunction · 0.90
runTestsFunction · 0.90
runTestsFunction · 0.90
runTestsFunction · 0.90
index.test.tsFile · 0.90
runTestsFunction · 0.90
index.test.tsFile · 0.90

Calls 3

withQueryFunction · 0.85
getFullUrlFunction · 0.70
fetchFunction · 0.50

Tested by 15

runTestsFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
fetchFunction · 0.72
respectsSideEffectsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…