import public Data.List.Quantifiersinterface Accept : Type -> TypecontentType : (ty : Type) -> ty = t => List StringcontentType : Accept t => (ty : Type) -> ty = t => List Stringdata IsAccept : Type -> TypeItIsAccept : Accept t => IsAccept tConsumerError : Typeinterface Consumer : Type -> Type -> TypeconsumeRaw : (ty : Type) -> ty = t => String -> Buffer -> Either ConsumerError aconsumeRaw : Consumer a t => (ty : Type) -> ty = t => String -> Buffer -> Either ConsumerError adata IsConsumer : Type -> Type -> TypeItIsConsumer : Consumer a t => IsConsumer a tunsafeConsumeBody : Error e => HasIO m => MonadPromise e m p => (Context me u v h1 s h2 Buffer b -> MonadPromise e m p' => p' (Context me' u' v' h1' s' h2' a' b')) -> Context me u v h1 s h2 (Publisher m e Buffer) b -> p (Context me' u' v' h1' s' h2' a' b')This function consumes the stream from the underlying server, thus the original stream cannot be used twice.
If you make sure that the original stream is not used twice, then this function can be used.
consumes : Error e => MonadTrans t => MonadPromise e IO m => Alternative (t m) => HasContentType h1 => (list : List Type) -> NonEmpty list => All IsAccept list => All (IsConsumer a) list => (Context me u v h1 s h2 (Either ConsumerError a) b -> MonadPromise e IO m' => m' (Context me' u' v' h1' s' h2' a' b')) -> Context me u v h1 s h2 (Publisher IO e Buffer) b -> t m (Context me' u' v' h1' s' h2' (Publisher IO e Buffer) b')consumes' : Error e => MonadTrans t => MonadPromise e IO m => Alternative (t m) => HasContentType h1 => (list : List Type) -> NonEmpty list => All IsAccept list => All (IsConsumer a) list => (Context me u v h1 s h2 ConsumerError b -> MonadPromise e IO m' => m' (Context me' u' v' h1' s' h2' a' b')) -> (Context me u v h1 s h2 a b -> MonadPromise e IO m'' => m'' (Context me' u' v' h1' s' h2' a'' b')) -> Context me u v h1 s h2 (Publisher IO e Buffer) b -> t m (Context me' u' v' h1' s' h2' (Publisher IO e Buffer) b')