Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- postForms :: (IsBlob blob, MonadJSM (Performable m), PerformEvent t m, TriggerEvent t m, Traversable f) => Text -> Event t (f (Map Text (FormValue blob))) -> m (Event t (f XhrResponse))
- postForms' :: (IsBlob blob, MonadJSM (Performable m), PerformEvent t m, TriggerEvent t m, Traversable f) => Text -> XhrRequestConfig a -> Event t (f (Map Text (FormValue blob))) -> m (Event t (f XhrResponse))
- data FormValue blob
- = FormValue_Text Text
- | FormValue_File blob (Maybe Text)
- fileToFormValue :: MonadJSM m => File -> m (FormValue File)
Documentation
:: (IsBlob blob, MonadJSM (Performable m), PerformEvent t m, TriggerEvent t m, Traversable f) | |
=> Text | The target url |
-> Event t (f (Map Text (FormValue blob))) | Maps of text keys and values that will be sent as FormData |
-> m (Event t (f XhrResponse)) |
Performs a POST request with the provided FormData payload
:: (IsBlob blob, MonadJSM (Performable m), PerformEvent t m, TriggerEvent t m, Traversable f) | |
=> Text | The target url |
-> XhrRequestConfig a | |
-> Event t (f (Map Text (FormValue blob))) | Maps of text keys and values that will be sent as FormData |
-> m (Event t (f XhrResponse)) |
Like postForms
but doesn't use a default XhrRequestConfig
, so a custom one can be provided.
A FormData value may be a blob/file or a string. The file can optionally be provided with filename.
FormValue_Text Text | |
FormValue_File blob (Maybe Text) |