x/oak/mod.ts

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Very Popular
Go to Latest
interface BodyOptionsContentTypes
import { type BodyOptionsContentTypes } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v11.1.0/mod.ts?p=prototype.%5BSymbol.iterator%5D&s=BodyOptionsContentTypes";

When setting the contentTypes property of BodyOptions, provide additional content types which can influence how the body is decoded. This is specifically designed to allow a server to support custom or specialized media types that are not part of the public database.

Properties

optional
bytes: string[]
[src]

Content types listed here will always return an Uint8Array.

optional
json: string[]
[src]

Content types listed here will be parsed as a JSON string.

optional
form: string[]
[src]

Content types listed here will be parsed as form data and return URLSearchParameters as the value of the body.

optional
formData: string[]
[src]

Content types listed here will be parsed as from data and return a FormDataBody interface as the value of the body.

optional
text: string[]
[src]

Content types listed here will be parsed as text.