getResponseBodyAsMultipart(_:from:transforming:boundary:allowsUnknownParts:requiredExactlyOncePartNames:requiredAtLeastOncePartNames:atMostOncePartNames:zeroOrMoreTimesPartNames:decoding:)

    Returns an async sequence of multipart parts parsed from the provided body stream.

    Converter+Client.swift:381

    This declaration is gated by at least one @_spi attribute.

    func getResponseBodyAsMultipart<C, Part>(_ type: MultipartBody<Part>.Type, from data: HTTPBody?, transforming transform: @escaping (MultipartBody<Part>) throws -> C, boundary: String, allowsUnknownParts: Bool, requiredExactlyOncePartNames: Set<String>, requiredAtLeastOncePartNames: Set<String>, atMostOncePartNames: Set<String>, zeroOrMoreTimesPartNames: Set<String>, decoding decoder: @escaping (MultipartRawPart) async throws -> Part) throws -> C where Part : Sendable

    Parameters

    type

    The type representing the type-safe multipart body.

    data

    The HTTP body data to transform.

    transform

    A closure that transforms the multipart body into the output type.

    boundary

    The multipart boundary string.

    allowsUnknownParts

    A Boolean value indicating whether parts with unknown names should be pass through. If false, encountering an unknown part throws an error whent the returned body sequence iterates it.

    requiredExactlyOncePartNames

    The list of part names that are required exactly once.

    requiredAtLeastOncePartNames

    The list of part names that are required at least once.

    atMostOncePartNames

    The list of part names that can appear at most once.

    zeroOrMoreTimesPartNames

    The list of names that can appear any number of times.

    decoder

    A closure that parses a raw part into a type-safe part.

    Returns

    A value of the output type.

    Throws

    If the transform closure throws.

    Other members in extension

    Type members

    Show system interfaces (1)

    Hide system interfaces

    Instance members

    Show system interfaces (44)

    Hide system interfaces