Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/keywork/http/functions/mod.ts>castToResponse

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

Infers the appropriate Response constructor for the given ResponseLike body.

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

Parameters

responseLike: ResponseLike
optional
reactRenderOptions: ReactRendererOptions

Returns

Promise<globalThis.Response>