Skip to main content
Module

x/drash/src/http/response.ts>DrashResponse#json

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
method DrashResponse.prototype.json
import { DrashResponse } from "https://deno.land/x/drash@v2.7.0/src/http/response.ts";

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