Get icon indicating copy to clipboard operation
Get copied to clipboard

Get 3.0

Open kean opened this issue 2 years ago • 0 comments

Prototype of the new Sendable-compliant APIs to address new Xcode 14.3 warnings and make the framework easier to user.

private struct User: Decodable {}

func usage() async throws {
    let client = APIClient(baseURL: nil)

    let dataTask = await client.dataTask(with: Request<User>(path: "/user"))

    if #available(iOS 15, *) {
        for await progress in dataTask.progress.values {
            print(progress)
        }
    }

    let response = try await dataTask.response.value
    let data = try await dataTask.data
    let string = try await dataTask.string
}

kean avatar Feb 22 '23 00:02 kean