MCPcopy Create free account
hub / github.com/TanStack/ai / makeRequest

Function makeRequest

packages/ai/tests/chat-params.test.ts:90–95  ·  view source on GitHub ↗
(body: unknown)

Source from the content-addressed store, hash-verified

88 }
89
90 const makeRequest = (body: unknown): Request =>
91 new Request('https://example.test/api/chat', {
92 method: 'POST',
93 headers: { 'content-type': 'application/json' },
94 body: typeof body === 'string' ? body : JSON.stringify(body),
95 })
96
97 it('returns parsed params on a valid body', async () => {
98 const params = await chatParamsFromRequest(makeRequest(validBody))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected