Created
February 24, 2011 23:14
-
-
Save panesofglass/843096 to your computer and use it in GitHub Desktop.
Options for Frank routing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let myApp = function | |
| | GET "/" _ -> render "Hello world!" | |
| | POST "/order" p -> frank { | |
| createThingFromParams p | |
| do! redirectTo "/" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let myApp = App [ | |
| get "/" (render "Hello world!") | |
| post "/order" (frank { | |
| let! p = getParams | |
| createThingFromParams p | |
| do! redirectTo "/" }) | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let myApp = function | |
| | GET "/" -> render "Hello world!" | |
| | POST "/order" -> frank { | |
| let! p = getParams | |
| createThingFromParams p | |
| do! redirectTo "/" } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added
GET("/", _) -> ...at one point, but I think the active pattern is correct as is for the explicit param version.