Skip to main content
Module

x/oak_middleware/mod.ts>responseTypeHeader

A collection of middleware to use with oak. 🐿️ 🦕
Latest
variable responseTypeHeader
import { responseTypeHeader } from "https://deno.land/x/oak_middleware@v0.1.0/mod.ts";

A middleware that will set the response time for other middleware in milliseconds as X-Response-Time which can be used for diagnostics and other instrumentation of an application. Utilise the middleware before the "real" processing occurs.

import { responseTimeHeader } from "https://deno.land/x/oak-middleware/mod.ts";
import { Application } from "https://deno.land/x/oak/mod.ts"

const app = new App();
app.use(responseTimeHeader);

// other middleware

await app.listen(":80");

type

Middleware