[haskell-http-client] update readme; improve lens generation; fix dateFormat (#6448)

* point readme links to canonical locations

* use lenses for non-required model fields, instead of traversals

* fix .gitignore generation

* fix dateFormat cli option bug
This commit is contained in:
Jon Schoning
2017-09-07 10:17:49 -05:00
committed by wing328
parent 3cd3b907f6
commit 4310ea326c
29 changed files with 601 additions and 654 deletions

View File

@@ -200,8 +200,8 @@ runUser mgr config = do
let createUserRequest = S.createUser S.MimeJSON user
_ <- S.dispatchLbs mgr config createUserRequest S.MimeJSON
-- can use traversals or lenses (model record names are appended with T or L) to view or modify records
let users = take 8 $ drop 1 $ iterate (L.over S.userUsernameT (<> "*") . L.over S.userIdT (+1)) user
-- can use lenses (model record names are appended L) to view or modify records
let users = take 8 $ drop 1 $ iterate (L.over S.userUsernameL (fmap (<> "*")) . L.over S.userIdL (fmap (+ 1))) user
let createUsersWithArrayInputRequest = S.createUsersWithArrayInput S.MimeJSON users
_ <- S.dispatchLbs mgr config createUsersWithArrayInputRequest S.MimeNoContent