Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {-# LANGUAGE OverloadedStrings #-}
- import Control.Monad.IO.Class
- import Data.Aeson
- import Network.HTTP.Req
- main :: IO ()
- main = runReq defaultHttpConfig $ do
- let payload = object [ ]
- r <-
- req
- POST
- (https "api.onepeloton.com" /: "auth" /: "login")
- (ReqBodyJson payload) -- use built-in options or add your own
- jsonResponse -- specify how to interpret response
- mempty -- query params, headers, explicit port number, etc.
- liftIO $ print (responseBody r :: Value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement