Get post function back without overwriting content
This commit is contained in:
parent
8664c010da
commit
fdb564abfe
@ -464,7 +464,9 @@ addNonce = addNonce_ ""
|
|||||||
post :: (Yesod site, RedirectUrl site url)
|
post :: (Yesod site, RedirectUrl site url)
|
||||||
=> url
|
=> url
|
||||||
-> YesodExample site ()
|
-> YesodExample site ()
|
||||||
post url = postBody url ""
|
post url = request $ do
|
||||||
|
setMethod "POST"
|
||||||
|
setUrl url
|
||||||
|
|
||||||
-- | Perform a POST request to url with sending a body into it.
|
-- | Perform a POST request to url with sending a body into it.
|
||||||
postBody :: (Yesod site, RedirectUrl site url)
|
postBody :: (Yesod site, RedirectUrl site url)
|
||||||
@ -472,9 +474,9 @@ postBody :: (Yesod site, RedirectUrl site url)
|
|||||||
-> BSL8.ByteString
|
-> BSL8.ByteString
|
||||||
-> YesodExample site ()
|
-> YesodExample site ()
|
||||||
postBody url body = request $ do
|
postBody url body = request $ do
|
||||||
setRequestBody body
|
|
||||||
setMethod "POST"
|
setMethod "POST"
|
||||||
setUrl url
|
setUrl url
|
||||||
|
setRequestBody body
|
||||||
|
|
||||||
-- | Perform a GET request to url, using params
|
-- | Perform a GET request to url, using params
|
||||||
get :: (Yesod site, RedirectUrl site url)
|
get :: (Yesod site, RedirectUrl site url)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user