wai-extra: Provides some basic WAI handlers and middleware.

[ library, mit, web ] [ Propose Tags ]

Provides basic WAI handler and middleware functionality:

Hspec testing facilities and helpers for WAI.

Send server events to the client. Compatible with the JavaScript EventSource API.

Override the Accept header in a request. Special handling for the _accept query parameter (which is used throughout WAI override the Accept header).

WAI Middleware for adding arbitrary headers to an HTTP request.

Clean a request path to a canonical form.

Negotiate HTTP payload gzip compression.

WAI Basic Authentication Middleware which uses Authorization header.

"JSON with Padding" middleware. Automatic wrapping of JSON responses to convert into JSONP.

Allows overriding of the HTTP request method via the _method query string parameter.

Request logging middleware for development and production environments

Rewrite request path info based on a custom conversion rules.

Convert ResponseFile type responses into ResponseStream type.

Redirect incoming requests to a new host based on custom rules.

API docs and the README are available at http://www.stackage.org/package/wai-extra.

[Skip to Readme]
Versions [faq] 0.0.0,,, 0.1.0, 0.1.1, 0.1.2,, 0.1.3,, 0.2.0, 0.2.1, 0.2.2,,, 0.2.3, 0.2.4,,, 0.3.0, 0.3.1, 0.3.2,, 0.3.3, 0.4.0,,,,,, 0.4.2, 0.4.3, 0.4.4, 0.4.5,,, 0.4.6, 1.0.0,, 1.1.0,, 1.2.0,,,,,,, 1.3.0,,,,,, 1.3.1,, 1.3.2,,,,, 1.3.3,,, 1.3.4,,,,,,, 2.0.0,, 2.0.1,,, 2.0.2, 2.0.3,,,, 2.1.0,, 2.1.1,,,, 3.0.0,, 3.0.1,,, 3.0.2,,, 3.0.3,,, 3.0.4,,,,,,, 3.0.5, 3.0.6,, 3.0.7,,,,, 3.0.9, 3.0.10,, 3.0.11,, 3.0.12, 3.0.13,, 3.0.14,,, 3.0.15,,,,,, 3.0.17, 3.0.18, 3.0.19,,,,,,,,,,,,, 3.0.25, 3.0.26,, 3.0.27, 3.0.28, 3.0.29,, (info)
Change log ChangeLog.md
Dependencies aeson, ansi-terminal, base (>=4.8 && <5), base64-bytestring, bytestring (>=0.10.4), case-insensitive (>=0.2), containers, cookie, data-default-class, deepseq, directory (>=1.0.1), fast-logger (>=2.4.5), http-types (>=0.7), http2, iproute, network (>=, old-locale (>= && <1.1), resourcet (>=0.4.6 && <1.3), streaming-commons (>=0.2), text (>=0.7), time (>=1.1.4), transformers (>=0.2.2), unix, unix-compat, vault, void (>=0.5), wai (>= && <3.3), wai-logger (>=2.3.2), word8, zlib [details]
License MIT
Author Michael Snoyman
Maintainer michael@snoyman.com
Revised Revision 1 made by MichaelSnoyman at 2019-10-10T03:40:11Z
Category Web
Home page http://github.com/yesodweb/wai
Source repo head: git clone git://github.com/yesodweb/wai.git
Uploaded by MichaelSnoyman at 2019-08-12T10:29:58Z
Distributions Arch:, Debian:, Fedora:3.0.29, FreeBSD:3.0.10, LTSHaskell:, NixOS:, Stackage:3.0.26
Executables example
Downloads 187370 total (1928 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-08-12 [all 1 reports]


[Index] [Quick Jump]



Build example executable.


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees

Readme for wai-extra-3.0.28

[back to package description]


The goal here is to provide common features without many dependencies.

Example using Server-Sent Events

There is a small example using Server-Sent Events (SSE) in the ./example directory.

Run the commands below to start the server on http://localhost:8080

$ stack build .
$ stack exec example