Safe Haskell | None |
---|
Module providing a Snap backend for the digestive-functors library
- type SnapPartPolicy = PartInfo -> PartUploadPolicy
- data SnapFormConfig = SnapFormConfig {}
- defaultSnapFormConfig :: SnapFormConfig
- runForm :: MonadSnap m => Text -> Form v m a -> m (View v, Maybe a)
- runFormWith :: MonadSnap m => SnapFormConfig -> Text -> Form v m a -> m (View v, Maybe a)
Documentation
type SnapPartPolicy = PartInfo -> PartUploadPolicySource
data SnapFormConfig Source
SnapFormConfig | |
|
Runs a form with the HTTP input provided by Snap.
Automatically picks between getForm
and postForm
based on the request
method. Set method
in the SnapFormConfig
to override this behaviour.
:: MonadSnap m | |
=> SnapFormConfig | Tempdir and upload policies |
-> Text | Name for the form |
-> Form v m a | Form to run |
-> m (View v, Maybe a) | Result |
Runs a form with a custom upload policy, and HTTP input from snap.
Automatically picks between getForm
and postForm
based on request
method. Set method
in the SnapFormConfig
to override this behaviour.