4\report{Kazu Yamamoto}%05/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:
14type Application = Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived
17That is, a WAI application takes two arguments: a \texttt{Request} and
18a function to send a \texttt{Response}.
19So, the typical behavior of WAI application is
21generating a response and
22passing the response to the function.
24Historically speaking, this interface made possible to develop handlers
26The WAI applications can run through FastCGI (wai-handler-fastcgi),
27run as stand-alone (wai-handler-webkit), etc.
28But the most popular handler is based on HTTP, of course.
29The major HTTP handler for WAI is Warp which now provides
30both HTTP/1.1 and HTTP/2. TLS (warp-tls) is also available.
32WebSocket (wai-websocket) and Event Source (wai-extra)
33can be implemented, too.
35It is possible to develop WAI applications directly.
36For instance, Hoogle and Mighttpd2~\cref{mighttpd2} take this way.
37However, you may want to use web application frameworks
38such as Apiary, MFlow~\cref{mflow}, rest, Servant, Scotty~\cref{scotty}, Spock,
39Yesod~\cref{yesod}, etc.
41WAI also provides \texttt{Middleware}:
44type Middleware = Application -> Application
47WAI middleware can inspect and transform a request, for example by automatically gzipping a response or logging a request (wai-extra).
49Since the last HCAR, WAI has successfully released version 3.2,
50which removes the experimental HTTP/2 module and some APIs.
51We bumped the version from 3.0 to 3.2 for consistency with
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