(body: unknown, init: ResponseInit = {})
| 5 | import { VERSION } from '../version.js'; |
| 6 | |
| 7 | function jsonResponse(body: unknown, init: ResponseInit = {}): Response { |
| 8 | return new Response(JSON.stringify(body), { |
| 9 | status: 200, |
| 10 | headers: { 'content-type': 'application/json' }, |
| 11 | ...init, |
| 12 | }); |
| 13 | } |
| 14 | |
| 15 | function errorEnvelopeResponse(status: number, code: string, init: ResponseInit = {}): Response { |
| 16 | return jsonResponse( |
no outgoing calls
no test coverage detected