di-wai-0.1: Di logging for WAI requests and responses
Safe HaskellSafe-Inferred
LanguageGHC2021

Di.Wai

Description

This module is designed to be imported as follows:

import qualified Di.Wai
Synopsis

Documentation

middleware :: MonadIO m => Df1 -> m (Middleware, Request -> Maybe Df1) Source #

Obtain a Middleware that will log incomming Requests and outgoing Responses.

do (middleware, lookup) <- Di.Wai.middleware di
  • The obtained middleware shall be applied to your Application.
  • The obtained lookup function can be used to obtain the Df1 that includes Path data about Request. It returns Nothing if this particular middleware was not used on the given Request.