text
A plain text response (text/plain; charset=utf-8).
A plain text response (text/plain; charset=utf-8).
Import#
ts
import { text } from "@shadow-js/dusk/server";
Signature#
ts
function text(body: string, init: ResponseInit = {}): Response
Parameters#
| Name | Description |
|---|---|
body |
The text. |
init |
Status and headers. |
Returns#
The response.
Examples#
ts
export const GET = () => text("pong");