MultipartForm
public struct MultipartForm
Representation of a multipart form request body.
-
Initialize an empty form.
Declaration
Swift
public init() -
Append a body part to the form.
Declaration
Swift
public mutating func appendPart(name: String, contents: Data)Parameters
nameThe name of the part.
contentsThe raw data to include in the body part.
-
Append a file body part to the form.
Declaration
Swift
public mutating func appendFilePart(name: String, contents: InputStream, length: Int, fileName: String, mimeType: String)Parameters
nameThe name of the part.
contentsA stream containing the file contents.
lengthThe number of bytes in the file.
fileNameThe name of the file.
mimeTypeThe content type of the file.
MultipartForm Structure Reference