4\report{Kazu Yamamoto}%11/17
5\participants{Michael Snoyman, Greg Weber}
9WAI (Web Application Interface) is an application interface between web
10applications and handlers in Haskell. The \texttt{Application} data type is
16 -> (Response -> IO ResponseReceived)
17 -> IO ResponseReceived
20That is, a WAI application takes two arguments: a \texttt{Request} and a
21function to send a \texttt{Response}. So, the typical behavior of WAI
22application is processing a request, generating a response and passing the
23response to the function.
25Historically speaking, this interface made possible to develop handlers other
26than HTTP. The WAI applications can run through FastCGI
27(wai-handler-fastcgi), run as stand-alone (wai-handler-webkit), etc. But the
28most popular handler is based on HTTP, of course. The major HTTP handler for
29WAI is Warp which now provides both HTTP/1.1 and HTTP/2. TLS (warp-tls) is
30also available. New transports such as WebSocket (wai-websocket) and Event
31Source (wai-extra) can be implemented, too.
33It is possible to develop WAI applications directly. For instance, Hoogle and
34Mighttpd2 take this way. However, you may want to use web application
35frameworks such as Apiary, MFlow, rest, Servant, Scotty, Spock, Yesod, etc.
37WAI also provides \texttt{Middleware}:
40type Middleware = Application -> Application
43WAI middleware can inspect and transform a request, for example by
44automatically gzipping a response or logging a request (wai-extra).
46Since the last HCAR, no major changes were made.
50\item\url{https://groups.google.com/d/forum/haskell-wai}
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list