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.

  1. simpleHTTP_ :: Stream s => s -> Request_String -> IO (Result Response_String)

    HTTP Network.HTTP.Stream

    Like simpleHTTP, but acting on an already opened stream.

  2. 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.

  3. simpleHTTP' :: (ToMessage b, Monad m, Functor m) => (UnWebT m a -> UnWebT IO b) -> Conf -> ServerPartT m a -> IO ()

    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.

  4. simpleHTTP'' :: (ToMessage b, Monad m, Functor m) => ServerPartT m b -> Request -> m Response

    happstack-server Happstack.Server

    Generate a result from a ServerPartT and a Request. This is mainly used by CGI (and fast-cgi) wrappers.

  5. 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

  6. simpleHTTPWithSocket' :: (ToMessage b, Monad m, Functor m) => (UnWebT m a -> UnWebT IO b) -> Socket -> Conf -> ServerPartT m a -> IO ()

    happstack-server Happstack.Server

    Like simpleHTTP' with a socket.

  7. simpleHTTP' :: (ToMessage b, Monad m, Functor m) => (UnWebT m a -> UnWebT IO b) -> Conf -> ServerPartT m a -> IO ()

    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.

  8. simpleHTTP'' :: (ToMessage b, Monad m, Functor m) => ServerPartT m b -> Request -> m Response

    happstack-server Happstack.Server.SimpleHTTP

    Generate a result from a ServerPartT and a Request. This is mainly used by CGI (and fast-cgi) wrappers.

  9. 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

  10. simpleHTTPWithSocket' :: (ToMessage b, Monad m, Functor m) => (UnWebT m a -> UnWebT IO b) -> Socket -> Conf -> ServerPartT m a -> IO ()

    happstack-server Happstack.Server.SimpleHTTP

    Like simpleHTTP' with a socket.

Page 2 of many | Previous | Next