classafButter::MultipartForm
sys::Obj afButter::MultipartForm
Represents Multipart Form Data as defined by RFC 2388. Used to write data to a request.
- write
This write(Str name, Buf content, MimeType? contentType := null)
Writes a part.
- writeFile
This writeFile(Str name, File file, MimeType? mimeType := null)
Writes a File part. If
mimeType
is not passed in, it is taken from the file's extension.- writeJson
This writeJson(Str name, Str json)
Writes a JSON part.
- writeJsonObj
This writeJsonObj(Str name, Obj? jsonObj)
Writes a JSON part. Converts the given obj to a JSON str first. (using
JsonOutStream
.)- writeText
This writeText(Str name, Str text)
Writes a standard text part. Use for setting form fields.