@@ -13,9 +13,8 @@ type MyApi = "books" :> Get '[JSON] [Book] -- GET /books
13myApi :: Proxy MyApi
13myApi :: Proxy MyApi
14myApi = Proxy
14myApi = Proxy
16−getAllBooks :: ExceptT String IO [Book]
16+getAllBooks :: Manager -> BaseUrl -> ExceptT String IO [Book]
17−postNewBook :: Book -> ExceptT String IO Book
17+postNewBook :: Book -> Manager -> BaseUrl -> ExceptT String IO Book
18-- 'client' allows you to produce operations to query an API from a client.
18-- 'client' allows you to produce operations to query an API from a client.
19−(getAllBooks :<|> postNewBook) = client myApi host
19+(getAllBooks :<|> postNewBook) = client myApi
20− where host = BaseUrl Http "localhost" 8080