Multipart

decodes multipart/form-data bodies (RFC 7578) into their FormParts. The boundary is a parameter of the Content-Type header; Request.multipart-data reads it off the request for you.

(match (Request.multipart-data &req)
  (Result.Success parts)
    (println* (FormPart.name (Array.unsafe-nth &parts 0)))
  (Result.Error e) (IO.errorln &e))

parse

defn

(Fn [(Ref String a), (Ref String b)] (Result (Array FormPart) String))

                        (parse body boundary)
                    

decodes a multipart/form-data body with the given boundary into its FormParts. Fails when the opening boundary delimiter is absent.