func asyncWhiskData()

in core/swift57Action/_Whisk.swift [263:276]


    func asyncWhiskData(with request: URLRequest) async throws -> Data {
        let taskResult = await withCheckedContinuation { continuation in
            self.dataTask(with: request) { data, response, error in
                continuation.resume(returning: (data, response, error))
            }.resume()
        }
        if let error = taskResult.2 {
            throw WhiskError.generic(error)
        }
        guard let data = taskResult.0 else {
            throw WhiskError.noData
        }
        return data
    }