A lightweight Swift client for connecting to JSON APIs with automatic model parsing and promise-based networking.
ws is a Swift networking library that provides an elegant way to connect to JSON APIs in iOS apps. It simplifies common tasks like making HTTP requests, handling responses, and parsing JSON into Swift models by automating boilerplate code. The library is built on top of Alamofire for networking and uses promises for asynchronous operations.
iOS developers building apps that consume RESTful JSON APIs and want to reduce networking boilerplate. It's particularly useful for Swift developers who prefer a declarative, type-safe approach to API interactions.
Developers choose ws for its simplicity and automatic model parsing—changing a function's return type is enough to parse JSON into models. It combines the reliability of Alamofire with the clarity of promises, offering a lightweight alternative to writing custom networking layers.
⚠️ Deprecated - (in favour of Networking) :cloud: Elegantly connect to a JSON api. (Alamofire + Promises + JSON Parsing)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Infers return types to parse JSON into Swift models or arrays without manual decoding, as shown in examples where changing a function's return type automatically handles parsing.
Uses the `then` promise library for readable asynchronous code, avoiding callback hell in requests like `ws.get("/users").then { json in ... }`.
Offers configurable network logging with `ws.logLevels = .debug` to easily monitor API calls and responses during development.
Provides helper functions for common operations (GET, POST, etc.), demonstrated in the Article API example that wraps CRUD logic concisely.
The README explicitly states ws is deprecated for iOS 13+, with maintainers urging migration to 'Networking', risking outdated dependencies and lack of future updates.
Relies on Alamofire for networking and Arrow for JSON parsing instead of Swift's native URLSession and Codable, adding bloat and potential compatibility issues.
SPM integration is only available on a separate 'spm-only' branch, making setup less seamless compared to Carthage or Cocoapods for teams preferring SPM.