4 import Network.HTTP.Client
13 -- we parse CLI options
14 opts@(ClientOpts (Helpful uri) _ _ (Helpful verb)) <- getRecord "Gargantext client"
15 mgr <- newManager defaultManagerSettings
16 burl <- parseBaseUrl uri
18 putStrLn $ "[Debug] user: " ++ maybe "<none>" show (unHelpful $ user opts)
19 putStrLn $ "[Debug] backend: " ++ show burl
20 -- we run 'script' from the Script module, reporting potential errors
21 res <- runClientM (script opts) (mkClientEnv mgr burl)
23 Left err -> putStrLn $ "[Client error] " ++ show err