Response
Byte includes utility functions to create static response handlers:
All methods accept a response body and a ResponseInit
object as arguments.
For body
, text
and html
method, the response body can be in any format listed here,
while the json
method only accepts values that are serializable using JSON.stringify
.
Note that the responses create by these handlers do not contain status
, statusText
and headers
from the request context.