Skip to main content
Module

x/keywork/http/mod.ts>castToResponse

A library for building V8 Isolate web apps on Cloudflare Workers, Deno, and Node.JS
Latest
function castToResponse
import { castToResponse } from "https://deno.land/x/keywork@v6.2.1/http/mod.ts";

Infers the appropriate Response constructor for the given ResponseLike body.

While the Keywork#Router.RequestRouter | RequestRouter automatically converts returned values via castToResponse.

Parameters

responseLike: ResponseLike
optional
reactRenderOptions: ReactRendererOptions