Module HTTP/MultiPart

This module is undocumented. This is a list of its definitions.

addBodyPart :: MultiPart -> BodyPart -> <Proc> MultiPart

Appends the part to the multipart body and returns the same body, which the call has changed.

bodyPart :: a -> MediaType -> <Proc> BodyPart

A part that carries the given value, sent as the given media type. The value is converted to bytes the same way as for entity.

fileDataBodyPart :: String -> File -> MediaType -> <Proc> BodyPart

A form field part that sends the contents of the file: the first argument is the field name and the third the media type. The name of the file is sent as the file name of the part.

formDataBodyPart :: String -> a -> MediaType -> <Proc> BodyPart

A form field part: the first argument is the field name, the second the value and the third the media type it is sent as.

formDataMultiPart :: <Proc> MultiPart

An empty multipart/form-data body, the kind an HTML form submits and the one that formDataBodyPart and fileDataBodyPart parts belong in.

multiPart :: MediaType -> <Proc> MultiPart

An empty multipart body of the given media type. For the usual multipart/form-data body, use formDataMultiPart instead.

multiPartAsBodyPart :: MultiPart -> BodyPart

Views a multipart body as a body part, so that it can be nested inside another multipart body.

streamDataBodyPart :: String -> InputStream -> String -> MediaType -> <Proc> BodyPart

A form field part that sends everything the stream yields. The arguments are the field name, the stream, the file name to report for the part, and the media type.