x/oak/body.ts

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Very Popular
Go to Latest
method RequestBody.prototype.has
import { RequestBody } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v11.1.0/body.ts?p=prototype.has&s=RequestBody";

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.