Skip to main content
Module

x/drash/tests/deps.ts>Drash.Response#json

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
method Drash.Response.prototype.json
import { Drash } from "https://deno.land/x/drash@v2.7.0/tests/deps.ts";
const { Response } = Drash;

Set the body of this response as JSON.

Parameters

json: object
  • The object to assign to the body.
optional
status: number
  • The status to respond with.
optional
headers: Record<string, string> = [UNSUPPORTED]
  • Any extra headers you wish to specify apart of the content-type header