( body: unknown, options?: Options.WithContentType | undefined )
| 352 | * @since 4.0.0 |
| 353 | */ |
| 354 | export const jsonUnsafe = ( |
| 355 | body: unknown, |
| 356 | options?: Options.WithContentType | undefined |
| 357 | ): HttpServerResponse => { |
| 358 | const headers = options?.headers ? Headers.fromInput(options.headers) : Headers.empty |
| 359 | return makeResponse({ |
| 360 | status: options?.status ?? 200, |
| 361 | statusText: options?.statusText, |
| 362 | headers, |
| 363 | cookies: options?.cookies, |
| 364 | body: Body.jsonUnsafe(body, getContentType(options, headers)) |
| 365 | }) |
| 366 | } |
| 367 | |
| 368 | /** |
| 369 | * Creates a response from URL parameters using the |
nothing calls this directly
no test coverage detected