Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_nest/src/interfaces/mod.ts>Response

Refer to nestjs to realize some common functions for Deno, support hono and oak
Go to Latest
interface Response
Re-export
import { type Response } from "https://deno.land/x/deno_nest@v3.6.1/src/interfaces/mod.ts";

Properties

body:
| string
| object
| number
| boolean
| null
headers: Headers
status: Status
readonly
statusText: string

Methods

getOriginalContext<T>(): T
render(): any

This method should only called in middleware.

If you changed the response body, status, headers in middleware, you must call this method to render the response. Nevertheless, this can cause the render to be executed repeatedly. The processing of all more reasonable modification responses is in the interceptor, not in the middleware.