Structure
MultipartParser
Parses any kind of multipart encoded data into
MultipartSections.struct MultipartParser<Body> where Body : RangeReplaceableCollection, Body : Sendable, Body.Element == UInt8
Overview
Use parse(_:) when the whole message is already in memory. To parse a message as it arrives, wrap the incoming chunks in a StreamingMultipartParserAsyncSequence or a MultipartParserAsyncSequence instead.
Topics
Initializers
init(boundary: String)Creates a new parser for messages separated by the given boundary.
Instance Methods
func parse(Body) throws(MultipartParserError) -> [MultipartPart<Body>]Synchronously parse the multipart data into an array ofMultipartPart.