Skip to main content
Module

x/keywork/mod.ts>HTTP.castToResponse

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

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>