Advertisement
Guest User

Untitled

a guest
Mar 25th, 2021
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. {-# LANGUAGE OverloadedStrings #-}
  2.  
  3. import Control.Monad.IO.Class
  4. import Data.Aeson
  5. import Network.HTTP.Req
  6.  
  7. main :: IO ()
  8. main = runReq defaultHttpConfig $ do
  9. let payload = object [ ]
  10. r <-
  11. req
  12. POST
  13. (https "api.onepeloton.com" /: "auth" /: "login")
  14. (ReqBodyJson payload) -- use built-in options or add your own
  15. jsonResponse -- specify how to interpret response
  16. mempty -- query params, headers, explicit port number, etc.
  17. liftIO $ print (responseBody r :: Value)
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement