Swiftpack.co - kean/APIClient as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by kean.
kean/APIClient 0.0.3
A web API client in Swift built using Async/Await
⭐️ 133
🕓 4 days ago
iOS macOS watchOS tvOS macCatalyst
.package(url: "https://github.com/kean/APIClient.git", from: "0.0.3")

Web API Client

A modern web API client in Swift built using Async/Await and Actors.

let client = APIClient(host: "api.github.com")

// Using the client directly
let user: User = try await client.send(.get("/user"))
try await client.send(.post("/user/emails", body: ["kean@example.com"]))

// Using a predefined API definition
let repos = try await client.send(Resources.users("kean").repos.get)

For more information, read Web API Client in Swift.


Stars: 133
Last commit: 2 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.


Release Notes

APIClient 0.0.3
4 days ago

APIClient is now available on more platforms.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics