|
|
|
|
|
|
| Synopsis |
|
|
|
| Documentation |
|
| raiseC |
| :: | | | => Int | HTTP error code
| | -> String | Message
| | -> AController a | | | Raise an exception in controller
|
|
|
| raiseIO |
|
|
| Functions that are specific to application-level controllers
|
|
| internalError :: String -> AController a |
| Return HTTP 500 error with given message
|
|
| errorIf |
| :: | | | => Int | HTTP status code
| | -> String | Error message
| | -> Bool | Value of condition
| | -> Controller s HttpResponse () | | | Return HTTP error with given code, if condition is satisfied
|
|
|
| methodOnly :: RequestMethod -> AController a -> AController a |
| Run controller only if request method is as given, else raise HTTP 400 error
|
|
| ifMethod |
| :: | | | => RequestMethod | | | -> a | Default value
| | -> AController a | Run this
| | -> AController a | | | Run a controller only if given HTTP method, otherwise return default value
|
|
|
| forceMaybe |
| :: | | | => String | Error message
| | -> Maybe a | Maybe value
| | -> AController a | | | If value is supplied, return it. Otherwise, raise HTTP 500 error.
|
|
|
| Produced by Haddock version 2.4.2 |