3
5This library lets you automatically derive Haskell functions that let you query each endpoint of a *servant* webservice.
10type MyApi = "books" :> Get '[JSON] [Book] -- GET /books
11 :<|> "books" :> ReqBody Book :> Post '[JSON] Book -- POST /books
16getAllBooks :: Manager -> BaseUrl -> ExceptT String IO [Book]
17postNewBook :: Book -> Manager -> BaseUrl -> ExceptT String IO Book
18-- 'client' allows you to produce operations to query an API from a client.
19(getAllBooks :<|> postNewBook) = client myApi
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list