(body: any, init?: ResponseInit)
| 1 | export function json(body: any, init?: ResponseInit) { |
| 2 | const headers = { |
| 3 | "content-type": "application/json", |
| 4 | ...(init?.headers ?? {}), |
| 5 | }; |
| 6 | |
| 7 | const responseInit: ResponseInit = { |
| 8 | ...(init ?? {}), |
| 9 | headers, |
| 10 | }; |
| 11 | |
| 12 | return new Response(JSON.stringify(body), responseInit); |
| 13 | } |
no outgoing calls
searching dependent graphs…