Basic Request Handling in HAppS

One of the most basic functions of a web framework is to give you a way of controlling what happens when a web browser makes an http request.

$! Before explaining the theory of request handling in HAppS, !$ Let's look at some simple examples.

  1. Read the source code of the simpleHandlers function in ControllerBasic.hs to see how urls are handled in HAppS. Pay attention to the comments!
  2. Follow the urls below by clicking on them. Match what happens when you click on a link with the code in ControllerBasic.hs

The static file serving example above hints at the templating system used by this tutorial to put together web pages behind the scenes.

We learn about using templates with HAppS next.