ganeti

Safe HaskellSafe-Infered

Ganeti.Utils.Http

Contents

Description

Utils for HTTP servers

Synopsis

Configuration handling

defaultHttpConf :: FilePath -> FilePath -> Config Snap ()Source

httpConfFromOpts :: GanetiDaemon -> DaemonOptions -> IO (Config Snap ())Source

Get the HTTP Configuration from the daemon options.

Standard answers

error404 :: Snap ()Source

Resource not found error

plainJSON :: JSON a => a -> Snap ()Source

Return the JSON encoding of an object