Type alias Middleware<TRequest, TResponse>

Middleware<TRequest, TResponse>: ((this, request, response, next) => void)

Type Parameters

  • TRequest extends IncomingMessage = IncomingMessage

    Supported HTTP request type.

  • TResponse extends ServerResponse = ServerResponse

    Supported HTTP response type.

Type declaration

    • (this, request, response, next): void
    • HTTP middleware signature.

      This is a Connect-style middleware.

      Parameters

      • this: void
      • request: TRequest

        HTTP request.

      • response: TResponse

        HTTP response.

      • next: Next

        Next function to delegate request processing to or report error with.

      Returns void

Generated using TypeDoc