Module
Hyper.Response
- Package
- purescript-hyper
- Repository
- owickstrom/hyper
#StatusLineOpen Source
data StatusLineOpen
Type indicating that the status-line is ready to be sent.
#HeadersOpen Source
data HeadersOpen
Type indicating that headers are ready to be sent, i.e. the body streaming has not been started.
#BodyOpen Source
data BodyOpen
Type indicating that headers have already been sent, and that the body is currently streaming.
#ResponseEnded Source
data ResponseEnded
Type indicating that headers have already been sent, and that the body stream, and thus the response, is finished.
#ResponseStateTransition Source
type ResponseStateTransition m res from to = forall c req. Middleware m (Conn req (res from) c) (Conn req (res to) c) Unit
A middleware transitioning from one Response
state to another.
#Response Source
class Response (res :: Type -> Type) m b | res -> b where
The operations that a response writer, provided by the server backend, must support.
Members
writeStatus :: Status -> ResponseStateTransition m res StatusLineOpen HeadersOpen
writeHeader :: Header -> ResponseStateTransition m res HeadersOpen HeadersOpen
closeHeaders :: ResponseStateTransition m res HeadersOpen BodyOpen
send :: b -> ResponseStateTransition m res BodyOpen BodyOpen
end :: ResponseStateTransition m res BodyOpen ResponseEnded
#contentType Source
contentType :: forall c b res req m. Monad m => Response res m b => MediaType -> Middleware m (Conn req (res HeadersOpen) c) (Conn req (res HeadersOpen) c) Unit
#redirect Source
redirect :: forall c b res req m. Monad m => Response res m b => String -> Middleware m (Conn req (res StatusLineOpen) c) (Conn req (res HeadersOpen) c) Unit
#respond Source
respond :: forall c res req b r m. Monad m => ResponseWritable b m r => Response res m b => r -> Middleware m (Conn req (res BodyOpen) c) (Conn req (res ResponseEnded) c) Unit
- Modules
- Hyper.
Authentication - Hyper.
Authorization - Hyper.
Conn - Hyper.
ContentNegotiation - Hyper.
Cookies - Hyper.
Form - Hyper.
Form. Urlencoded - Hyper.
Header - Hyper.
Middleware - Hyper.
Middleware. Class - Hyper.
Middleware. QualifiedDo - Hyper.
Node. BasicAuth - Hyper.
Node. FileServer - Hyper.
Node. Server - Hyper.
Node. Server. Options - Hyper.
Node. Session. InMemory - Hyper.
Node. Test - Hyper.
Request - Hyper.
Response - Hyper.
Session - Hyper.
Status - Hyper.
Test. TestServer