MCPcopy Create free account
hub / github.com/honojs/node-server / createTraceLikeRequest

Function createTraceLikeRequest

test/request.test.ts:605–617  ·  view source on GitHub ↗
(method: string)

Source from the content-addressed store, hash-verified

603
604 it('should reject non-uppercase trace consistently regardless of access order', async () => {
605 const createTraceLikeRequest = (method: string) => {
606 const socket = new Socket()
607 const incomingMessage = new IncomingMessage(socket)
608 incomingMessage.method = method
609 incomingMessage.headers = {
610 host: 'localhost',
611 'content-type': 'text/plain',
612 }
613 incomingMessage.rawHeaders = ['host', 'localhost', 'content-type', 'text/plain']
614 incomingMessage.url = '/foo.txt'
615 ;(incomingMessage as IncomingMessage & { rawBody: Buffer }).rawBody = Buffer.from('foo')
616 return newRequest(incomingMessage)
617 }
618
619 for (const method of ['trace', 'TrAcE']) {
620 const req = createTraceLikeRequest(method)

Callers 1

request.test.tsFile · 0.85

Calls 1

newRequestFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…