@n7e/http-handler
TypeScript icon, indicating that this package has built-in type declarations

0.6.1 • Public • Published

HTTP Handler

A set of interfaces describing the functionality of an HTTP request handler.

For further insights, read on.

Installation

To install this library use your favorite package manager. No additional steps are required to start using the library.

npm install @n7e/http-handler

This library only contains a set of interfaces and is less than useless if you don't use TypeScript.

Request Handler

The concept of a request handler is some procedure able to produce an appropriate response from a given request. These kinds of procedures are central to HTTP servers as well as clients. Since this kind of procedure is very common this library provides an abstraction in the form of a RequestHandler interface.

This library does not provide an implementation but there may be dependant libraries that does.

RequestHandler is just an interface describing the functionality of a request handler. To create a request handler instance you need to reference a specific implementation.

Middleware

The concept of middleware is similar to that of a request handler with the addition of a request handler delegate to resume the middleware chain. Since this paradigm, similar to that of a request handler is very useful for both HTTP servers and clients this library provides an abstraction in the form of a Middleware interface.

This library does not provide an implementation but there may be dependant libraries that does.

Middleware is just an interface describing the functionality of HTTP middleware. To create a middleware instance you need to reference a specific implementation.

Readme

Keywords

Package Sidebar

Install

npm i @n7e/http-handler

Weekly Downloads

0

Version

0.6.1

License

MIT

Unpacked Size

4.9 kB

Total Files

11

Last publish

Collaborators

  • martin-n7e