MCPcopy
hub / github.com/fastify/fastify / doGet

Function doGet

test/internals/reply.test.js:21–32  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

19const path = require('node:path')
20
21const doGet = async function (url) {
22 const result = await fetch(url, {
23 method: 'GET',
24 redirect: 'manual',
25 keepAlive: false
26 })
27
28 return {
29 response: result,
30 body: await result.json().catch(() => undefined)
31 }
32}
33
34test('Once called, Reply should return an object with methods', t => {
35 t.plan(15)

Callers 1

reply.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected