File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
servant-client-core/src/Servant/Client/Core
servant-server/src/Servant/Server Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -761,11 +761,10 @@ instance ( HasClient m api
761
761
-- > myApi :: Proxy MyApi
762
762
-- > myApi = Proxy
763
763
-- >
764
- -- > getBooksBy :: Maybe Text -> ClientM [Book]
765
- -- > getBooksBy = client myApi
764
+ -- > getBooks :: ClientM [Book]
765
+ -- > getBooks = client myApi
766
766
-- > -- then you can just use "getBooksBy" to query that endpoint.
767
- -- > -- 'getBooksBy Nothing' for all books
768
- -- > -- 'getBooksBy (Just "Isaac Asimov")' to get all books by Isaac Asimov
767
+ -- > -- 'getBooks' for all books.
769
768
#ifdef HAS_TYPE_ERROR
770
769
instance (AtLeastOneFragment api , FragmentUnique (Fragment a :> api ), HasClient m api
771
770
#else
Original file line number Diff line number Diff line change @@ -890,9 +890,9 @@ type HasServerArrowTypeError a b =
890
890
-- > type MyApi = "books" :> Fragment Text :> Get '[JSON] [Book]
891
891
-- >
892
892
-- > server :: Server MyApi
893
- -- > server = getBooksBy
894
- -- > where getBooksBy :: Handler [Book]
895
- -- > getBooksBy = ...return all books...
893
+ -- > server = getBooks
894
+ -- > where getBooks :: Handler [Book]
895
+ -- > getBooks = ...return all books...
896
896
#ifdef HAS_TYPE_ERROR
897
897
instance (AtLeastOneFragment api , FragmentUnique (Fragment a1 :> api ), HasServer api context )
898
898
#else
You can’t perform that action at this time.
0 commit comments