Hoogle Search
Within LTS Haskell 22.23 (ghc-9.6.5)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
simpleHTTP_ :: Stream s => s -> Request_String -> IO (Result Response_String)HTTP Network.HTTP.Stream Like simpleHTTP, but acting on an already opened stream.
simpleHttpServe :: MonadSnap m => Config m a -> Snap () -> IO ()snap-server Snap.Http.Server Starts serving HTTP requests using the given handler. This function never returns; to shut down the HTTP server, kill the controlling thread. This function is like httpServe except it doesn't setup compression, reverse proxy address translation (via behindProxy), or the error handler; this allows it to be used from MonadSnap.
-
happstack-server Happstack.Server A combination of simpleHTTP'' and mapServerPartT. See mapServerPartT for a discussion of the first argument of this function. NOTE: This function always binds to IPv4 ports until Network module is fixed to support IPv6 in a portable way. Use simpleHTTPWithSocket with custom socket if you want different behaviour.
simpleHTTP'' :: (ToMessage b, Monad m, Functor m) => ServerPartT m b -> Request -> m Responsehappstack-server Happstack.Server Generate a result from a ServerPartT and a Request. This is mainly used by CGI (and fast-cgi) wrappers.
simpleHTTPWithSocket :: ToMessage a => Socket -> Conf -> ServerPartT IO a -> IO ()happstack-server Happstack.Server Run simpleHTTP with a previously bound socket. Useful if you want to run happstack as user on port 80. Use something like this:
import System.Posix.User (setUserID, UserEntry(..), getUserEntryForName) main = do let conf = nullConf { port = 80 } socket <- bindPort conf -- do other stuff as root here getUserEntryForName "www" >>= setUserID . userID -- finally start handling incoming requests tid <- forkIO $ simpleHTTPWithSocket socket Nothing conf impl
Note: It's important to use the same conf (or at least the same port) for bindPort and simpleHTTPWithSocket. see also: bindPort, bindIPv4-
happstack-server Happstack.Server Like simpleHTTP' with a socket.
-
happstack-server Happstack.Server.SimpleHTTP A combination of simpleHTTP'' and mapServerPartT. See mapServerPartT for a discussion of the first argument of this function. NOTE: This function always binds to IPv4 ports until Network module is fixed to support IPv6 in a portable way. Use simpleHTTPWithSocket with custom socket if you want different behaviour.
simpleHTTP'' :: (ToMessage b, Monad m, Functor m) => ServerPartT m b -> Request -> m Responsehappstack-server Happstack.Server.SimpleHTTP Generate a result from a ServerPartT and a Request. This is mainly used by CGI (and fast-cgi) wrappers.
simpleHTTPWithSocket :: ToMessage a => Socket -> Conf -> ServerPartT IO a -> IO ()happstack-server Happstack.Server.SimpleHTTP Run simpleHTTP with a previously bound socket. Useful if you want to run happstack as user on port 80. Use something like this:
import System.Posix.User (setUserID, UserEntry(..), getUserEntryForName) main = do let conf = nullConf { port = 80 } socket <- bindPort conf -- do other stuff as root here getUserEntryForName "www" >>= setUserID . userID -- finally start handling incoming requests tid <- forkIO $ simpleHTTPWithSocket socket Nothing conf impl
Note: It's important to use the same conf (or at least the same port) for bindPort and simpleHTTPWithSocket. see also: bindPort, bindIPv4-
happstack-server Happstack.Server.SimpleHTTP Like simpleHTTP' with a socket.