servant-streaming-server-0.3.0.0: Server instances for the 'servant-streaming' package.

Safe HaskellNone
LanguageHaskell2010

Servant.Streaming.Server

Description

This module provides an instance for HasServant for 'servant-streaming' combinators, so that servers with streaming (requests or responses) may be used.

As as convenience, it also re-exports the combinators themselves.

Synopsis

Documentation

data StreamResponse (method :: StdMethod) (status :: Nat) (contentTypes :: [*]) #

A response body that should be streamed, with specified method, status, and content-type.

Instances
(KnownNat status, AllMime contentTypes, ReflectMethod method) => HasServer (StreamResponse method status contentTypes :: *) ctx # 
Instance details

Defined in Servant.Streaming.Server.Internal

Associated Types

type ServerT (StreamResponse method status contentTypes) m :: * #

Methods

route :: Proxy (StreamResponse method status contentTypes) -> Context ctx -> Delayed env (Server (StreamResponse method status contentTypes)) -> Router env #

hoistServerWithContext :: Proxy (StreamResponse method status contentTypes) -> Proxy ctx -> (forall x. m x -> n x) -> ServerT (StreamResponse method status contentTypes) m -> ServerT (StreamResponse method status contentTypes) n #

type ServerT (StreamResponse method status contentTypes :: *) m # 
Instance details

Defined in Servant.Streaming.Server.Internal

type ServerT (StreamResponse method status contentTypes :: *) m = m (Stream (Of ByteString) (ResourceT IO) ())

type StreamBody (ct :: [*]) = StreamBodyMonad ct IO #

A request body that should be streamed.

type StreamResponseGet = StreamResponse GET 200 #

The streaming version of the Get combinator.

type StreamResponsePost = StreamResponse POST 200 #

The streaming version of the Post combinator.

type StreamResponsePut = StreamResponse PUT 200 #

The streaming version of the Put combinator.

type StreamResponsePatch = StreamResponse PATCH 200 #

The streaming version of the Patch combinator.