[web-devel] Any examples of using RequestBodyBuilder from http-enumerator

Aristid Breitkreuz aristidb at googlemail.com
Fri Dec 9 09:04:36 CET 2011


I think I had a similar problem once. The () may need to be changed to
forall a. a. Consider filing a bug in http-enumerator.

Aristid
Am 09.12.2011 08:16 schrieb "Erik de Castro Lopo" <mle+hs at mega-nerd.com>:

> Michael Snoyman wrote:
>
> >     RequestBodyBS bs ~== RequstBodyBuilder (S.length bs) (fromByteString
> bs)
>
> Ok, that probably means I need to look at RequestBodyEnum
> instead.
>
> What I'd like to do is somthing like:
>
>    status <- getFileStatus fname
>    let size = fromIntegral $ fileSize status
>    req { HE.requestBody = HE.RequestBodyEnum size $ enumBuilder fname }
>  where
>    enumBuilder :: String -> Enumerator Builder IO ()
>    enumBuilder fname = EB.enumFile fname ........
>
> but I can't get the types to match up. Its seems the () requirement
> for enumBuilder is too inflexible.
>
> Cheers,
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20111209/4e95b949/attachment.htm>


More information about the web-devel mailing list