In this recipe, we will look at how forms can be handled in the Snap Framework. We will also look at HTTP redirection and handling GET and POST methods.
Form handling in Snap
How to do it...
- Create a new project, form-handling-in-snap, with the simple stack template:
stack --resolver lts-9.1 new form-handling-in-snap simple
- Add a dependency on the following libraries in the build-depends subsection of the executable section, as follows:
executable form-handling-in-snap hs-source-dirs: src main-is: Main.hs default-language: Haskell2010 build-depends: base >= 4.7 && < 5 , snap-server , snap-core ...