Skip to content

Function

makeBoundaryBytes(_:end:as:)

Creates a properly formatted boundary to be used in a custom MultipartSerializer.writeBoundary method.
func makeBoundaryBytes<OutboundBody>(_ boundary: String, end: Bool = false, as: OutboundBody.Type = OutboundBody.self) -> OutboundBody where OutboundBody : RangeReplaceableCollection, OutboundBody : Sendable, OutboundBody.Element == UInt8

Parameters

boundary

The boundary to be formatted.

end

Whether this is the end boundary of the message.

Return Value

A formatted boundary.