Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Function

makeBoundaryBytes(_:end:as:)

Creates a properly formatted boundary to be used in a custom writeBoundary(end:) implementation.
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.

as

The body type to produce the boundary as.

Return Value

A formatted boundary.