salvia-1.0.0: Modular web application framework.

Network.Salvia.Handler.Printer

Synopsis

Documentation

hRequestPrinter :: FlushM Request m => m ()Source

The hRequestPrinter handler prints the entire HTTP request including the headers and the body to the socket towards the server. This handler is generally used as (one of) the last handler in a server environment.

hResponsePrinter :: FlushM Response m => m ()Source

The hResponsePrinter handler prints the entire HTTP response including the headers and the body to the socket towards the client. This handler is generally used as (one of) the last handler in a client environment.

hFlushHeaders :: forall m d. (Show (Http d), HandleM m, QueueM m, MonadIO m, HttpM d m) => d -> m ()Source

Send all the message headers directly over the socket.

todo: printer for rawResponse over response!!

hFlushHeadersOnly :: forall m d. (Show (Http d), HandleM m, QueueM m, MonadIO m, HttpM d m) => d -> m ()Source

Like hFlushHeaders but does not print status line, can be useful for CGI mode.

hFlushRequestHeaders :: FlushM Request m => m ()Source

Like hFlushHeaders but specifically for the request headers.

hFlushResponseHeaders :: FlushM Response m => m ()Source

Like hFlushHeaders but specifically for the response headers.

hFlushQueue :: (QueueM m, HandleM m, SocketM m, MonadIO m) => m ()Source

One by one apply all enqueued send actions to the socket.