MCPcopy
hub / github.com/nodejs/undici / getWithHost

Function getWithHost

test/client-request.js:695–702  ·  view source on GitHub ↗
(host, wanted)

Source from the content-addressed store, hash-verified

693 after(() => client.destroy())
694
695 const getWithHost = async (host, wanted) => {
696 const { body } = await client.request({
697 path: '/',
698 method: 'GET',
699 headers: { host }
700 })
701 t.strictEqual(await body.text(), wanted)
702 }
703
704 await getWithHost('test', 'test')
705 await getWithHost(undefined, serverAddress)

Callers 1

client-request.jsFile · 0.85

Calls 2

textMethod · 0.65
requestMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…