2\begin{hcarentry}[updated]{WAI}
4\report{Kazu Yamamoto}%11/16
5\participants{Michael Snoyman, Greg Weber}
9WAI (Web Application Interface) is an application interface
10between web applications and handlers in Haskell.
11The \texttt{Application} data type is defined as follows:
16 -> (Response -> IO ResponseReceived)
17 -> IO ResponseReceived
20That is, a WAI application takes two arguments: a \texttt{Request} and
21a function to send a \texttt{Response}.
22So, the typical behavior of WAI application is
24generating a response and
25passing the response to the function.
27Historically speaking, this interface made possible to develop handlers
29The WAI applications can run through FastCGI (wai-handler-fastcgi),
30run as stand-alone (wai-handler-webkit), etc.
31But the most popular handler is based on HTTP, of course.
32The major HTTP handler for WAI is Warp which now provides
33both HTTP/1.1 and HTTP/2. TLS (warp-tls) is also available.
35WebSocket (wai-websocket) and Event Source (wai-extra)
36can be implemented, too.
38It is possible to develop WAI applications directly.
39For instance, Hoogle and Mighttpd2 take this way.
40However, you may want to use web application frameworks
41such as Apiary, MFlow, rest, Servant, Scotty, Spock,
44WAI also provides \texttt{Middleware}:
47type Middleware = Application -> Application
50WAI middleware can inspect and transform a request, for example by automatically gzipping a response or logging a request (wai-extra).
52Since the last HCAR, no major changes were made.
56\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