3 import "HTTP/MediaType"
4 import "JavaBuiltin" as Java
6 importJava "org.glassfish.jersey.media.multipart.MultiPart" where
10 multiPart :: MediaType -> <Proc> MultiPart
13 addBodyPart :: MultiPart -> BodyPart -> <Proc> MultiPart
15 importJava "org.glassfish.jersey.media.multipart.BodyPart" where
19 bodyPart :: a -> MediaType -> <Proc> BodyPart
21 importJava "org.glassfish.jersey.media.multipart.FormDataBodyPart" where
25 formDataBodyPart :: String -> a -> MediaType -> <Proc> BodyPart
27 importJava "org.glassfish.jersey.media.multipart.file.FileDataBodyPart" where
31 fileDataBodyPart :: String -> File -> MediaType -> <Proc> BodyPart
33 importJava "org.glassfish.jersey.media.multipart.file.StreamDataBodyPart" where
34 data StreamDataBodyPart
37 streamDataBodyPart :: String -> InputStream -> String -> MediaType -> <Proc> BodyPart
39 multiPartAsBodyPart :: MultiPart -> BodyPart
40 multiPartAsBodyPart mp = Java.unsafeCoerce mp
42 formDataMultiPart :: <Proc> MultiPart
43 formDataMultiPart = multiPart MULTIPART_FORM_DATA_TYPE