hails-0.1.1: IFC enforcing web platform framework

Safe HaskellTrustworthy

Hails.Database.MongoDB.TCB.Convert

Contents

Synopsis

Converting HTTP requests

labeledDocI :: LabelState l p s => HttpReq a -> Labeled l ByteString -> LIO l p s (Labeled l (Document l))Source

Trusted transformer that takes a Labeled tuple with HttpReq and the request body as a ByteString and returns a Labeled Document with keys and values corresponding to the form fields from the request. The label on the Labeled result is the same as input. Arguments values are parsed in to BSON Strings except if the key is of the form "key_name[]" in which case all such arguments will be combined into an array of Strings.