Skip to main content
Module

x/oak/body.ts>RequestBody

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Extremely Popular
Go to Latest
class RequestBody
import { RequestBody } from "https://deno.land/x/oak@v12.5.0/body.ts";

Constructors

new
RequestBody(
unnamed 0: ServerRequestBody,
headers: Headers,
jsonBodyReviver?: (key: string, value: unknown) => unknown,
)

Methods

has(): boolean

Returns if the request might have a body or not, without attempting to consume it.

WARNING This is an unreliable API. In HTTP/2 it is not possible to determine if certain HTTP methods have a body or not without attempting to read the body. As of Deno 1.16.1 and later, for HTTP/1.1 aligns to the HTTP/2 behaviour.