( body: UrlParams.Input, options?: Options.WithContentType | undefined )
| 396 | * @since 4.0.0 |
| 397 | */ |
| 398 | export const urlParams = ( |
| 399 | body: UrlParams.Input, |
| 400 | options?: Options.WithContentType | undefined |
| 401 | ): HttpServerResponse => { |
| 402 | const headers = options?.headers ? Headers.fromInput(options.headers) : Headers.empty |
| 403 | return makeResponse({ |
| 404 | status: options?.status ?? 200, |
| 405 | statusText: options?.statusText, |
| 406 | headers, |
| 407 | cookies: options?.cookies, |
| 408 | body: Body.text( |
| 409 | UrlParams.toString(UrlParams.fromInput(body)), |
| 410 | getContentType(options, headers) ?? "application/x-www-form-urlencoded" |
| 411 | ) |
| 412 | }) |
| 413 | } |
| 414 | |
| 415 | /** |
| 416 | * Creates a response with a raw body value. |
nothing calls this directly
no test coverage detected