Merge pull request #518 from haskell-servant/jkarni/fix-client-readme
Remove host param from servant-client README.
This commit is contained in:
commit
46c8b26c92
1 changed files with 3 additions and 4 deletions
|
@ -13,9 +13,8 @@ type MyApi = "books" :> Get '[JSON] [Book] -- GET /books
|
|||
myApi :: Proxy MyApi
|
||||
myApi = Proxy
|
||||
|
||||
getAllBooks :: ExceptT String IO [Book]
|
||||
postNewBook :: Book -> ExceptT String IO Book
|
||||
getAllBooks :: Manager -> BaseUrl -> ExceptT String IO [Book]
|
||||
postNewBook :: Book -> Manager -> BaseUrl -> ExceptT String IO Book
|
||||
-- 'client' allows you to produce operations to query an API from a client.
|
||||
(getAllBooks :<|> postNewBook) = client myApi host
|
||||
where host = BaseUrl Http "localhost" 8080
|
||||
(getAllBooks :<|> postNewBook) = client myApi
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue