1 {-# LANGUAGE NoMonomorphismRestriction #-}
2 {-# LANGUAGE OverloadedStrings #-}
3 {-# LANGUAGE Rank2Types #-}
4 {-# LANGUAGE TypeApplications #-}
5 {-# OPTIONS_GHC -fno-warn-orphans #-}
6 {-# OPTIONS_GHC -Wno-missing-signatures #-}
8 import Data.Maybe (fromJust)
9 import qualified Control.Monad.Classes as MC
10 import qualified Network.HTTP.Client as Client
11 import qualified Pipes as P
14 import Symantic.HTTP.Client
15 import Symantic.HTTP.Pipes ()
19 -- | Derive the callers of the client.
26 manager <- Client.newManager Client.defaultManagerSettings
27 let baseURI = fromJust $ parseURI "http://localhost:8080"
28 let env = clientEnv manager baseURI
30 print =<< runClient env (client_succ 42)
32 (print =<<) $ runClientStream env (client_countdown 4) $ \pipe ->