make get and post use performMethod
This commit is contained in:
parent
7ad28d227c
commit
a9030aa294
@ -895,9 +895,7 @@ getRequestCookies = do
|
|||||||
post :: (Yesod site, RedirectUrl site url)
|
post :: (Yesod site, RedirectUrl site url)
|
||||||
=> url
|
=> url
|
||||||
-> YesodExample site ()
|
-> YesodExample site ()
|
||||||
post url = request $ do
|
post = performMethod "POST"
|
||||||
setMethod "POST"
|
|
||||||
setUrl url
|
|
||||||
|
|
||||||
-- | Perform a POST request to @url@ with the given body.
|
-- | Perform a POST request to @url@ with the given body.
|
||||||
--
|
--
|
||||||
@ -926,9 +924,7 @@ postBody url body = request $ do
|
|||||||
get :: (Yesod site, RedirectUrl site url)
|
get :: (Yesod site, RedirectUrl site url)
|
||||||
=> url
|
=> url
|
||||||
-> YesodExample site ()
|
-> YesodExample site ()
|
||||||
get url = request $ do
|
get = performMethod "GET"
|
||||||
setMethod "GET"
|
|
||||||
setUrl url
|
|
||||||
|
|
||||||
-- | Perform a request using a given method to @url@.
|
-- | Perform a request using a given method to @url@.
|
||||||
--
|
--
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user