Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
A middleware framework for handling HTTP with Deno, Node.js, Bun and Cloudflare Workers 🐿️🦕🥟⚙️
default
A middleware framework for handling HTTP with Deno CLI, Deno Deploy, Cloudflare Workers, Node.js, and Bun.
A class which registers middleware (via .use()
) and then processes
inbound requests against that middleware (via .listen()
).
Available options that are used when creating a new instance of
Application
.
Compose multiple middleware functions into a single middleware function.
A collection of oak specific APIs for management of ETags.
Create middleware that will attempt to decode the response.body into
something that can be used to generate an ETag
and add the ETag
header to
the response.
For a given Context, try to determine the response body entity that an ETag can be calculated from.
Options which can be specified when listening.
Interface options when listening on TLS.
Middleware are functions which are chained together to deal with requests.
Middleware objects allow encapsulation of middleware along with the ability to initialize the middleware upon listen.
Type that represents Middleware
or
MiddlewareObject
.
A function for chaining middleware.
Middleware that provides a back-to-back proxy for requests.
Options which can be specified on the proxy
middleware.
A symbol that indicates to response.redirect()
to attempt to redirect
back to the request referrer. For example:
An interface which provides information about the current request. The
instance related to the current request is available on the
Context
's .request
property.
The internal abstraction of a route used by the oak Router
.
The context associated with serve middleware requests on a router.
A dynamic type which attempts to determine the route params based on matching the route string.
Options which can be specified when calling the .allowedMethods()
method
on a Router
instance.
Options which can be specified when creating a new instance of a
Router
.
Middleware that will be called by the router when handling a specific parameter, which the middleware will be called when a request matches the route parameter.
Asynchronously fulfill a response with a file from the local file system.
Options which can be specified when using the send
middleware.
The abstract constructor interface that custom servers need to adhere to
when using with an Application
.
The base type of state which is associated with an application or context.
A collection of utility APIs which can make testing of an oak application easier.
Creates a mock of Application
.
Create a mock of Context
or RouterContext
.
Creates a mock next()
function which can be used when calling
middleware.
application
Contains the core concept of oak, the middleware application. Typical usage is the creation of an application instance, registration of middleware, and then starting to listen for requests.
A class which registers middleware (via .use()
) and then processes
inbound requests against that middleware (via .listen()
).
An event that occurs when the application closes.
An event that occurs when the application starts listening for requests.
Available options that are used when creating a new instance of
Application
.
Options which can be specified when listening.
Interface options when listening on TLS.
The base type of state which is associated with an application or context.
context
Contains the Context
class which is the context that is provided
to middleware.
etag
A collection of oak specific APIs for management of ETags.
http_server_bun
The abstraction that oak uses when dealing with requests and responses within the Bun runtime that leverages the built in HTTP server.
http_server_native
The abstraction that oak uses when dealing with requests and responses within the Deno runtime.
http_server_node
The abstraction that oak uses when dealing with requests and responses within the Node.js runtime.
middleware
The internal middleware interfaces and abstractions used by oak.
Compose multiple middleware functions into a single middleware function.
A type guard that returns true if the value is
MiddlewareObject
.
Middleware are functions which are chained together to deal with requests.
Middleware objects allow encapsulation of middleware along with the ability to initialize the middleware upon listen.
Type that represents Middleware
or
MiddlewareObject
.
A function for chaining middleware.
proxy
Middleware for oak that allows back-to-back proxies of requests to be used.
Middleware that provides a back-to-back proxy for requests.
Options which can be specified on the proxy
middleware.
An interface which provides information about the current request. The
instance related to the current request is available on the
Context
's .request
property.
A symbol that indicates to response.redirect()
to attempt to redirect
back to the request referrer. For example:
The various types of bodies supported when setting the value of .body
on a Response
A function that when invoked returns or resolves to a
ResponseBody
.
router
Contains the router of oak. Typical usage is the creation of an application instance, the creation of a router instance, registration of route middleware, registration of router with the application, and then starting to listen for requests.
The internal abstraction of a route used by the oak Router
.
A dynamic type which attempts to determine the route params based on matching the route string.
Options which can be specified when calling the .allowedMethods()
method
on a Router
instance.
Options which can be specified when creating a new instance of a
Router
.
Middleware that will be called by the router when handling a specific parameter, which the middleware will be called when a request matches the route parameter.
send
Contains the send function which can be used to send static assets while supporting a range of HTTP capabilities.
Asynchronously fulfill a response with a file from the local file system.
Options which can be specified when using the send
middleware.
testing
A collection of utility APIs which can make testing of an oak application easier.
Creates a mock of Application
.
Create a mock of Context
or RouterContext
.
Creates a mock next()
function which can be used when calling
middleware.