A Swift/Obj-C HTTP framework built on URLSession with first-class REST and JSON support.
PMHTTP is an HTTP framework for Apple platforms built on top of URLSession. It provides essential features missing from URLSession, such as JSON parsing, multipart uploads, structured error handling, and intelligent caching, specifically designed for REST API interactions. It solves the problem of building robust, type-safe network layers in Swift and Objective-C applications.
iOS, macOS, watchOS, and tvOS developers building apps that consume RESTful JSON APIs and need a reliable, thread-safe networking layer with first-class Swift and Objective-C support.
Developers choose PMHTTP because it extends URLSession with production-ready features like automatic retrying, request mocking, and smart caching while maintaining full compatibility with both Swift and Objective-C. Its focus on correctness, type safety, and explicit design reduces common networking pitfalls.
Swift/Obj-C HTTP framework with a focus on REST and JSON
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Integrates with PMJSON for robust, strongly-typed parsing, ensuring type safety and reducing errors in JSON responses, as highlighted in the README's usage examples.
Provides clear, typed errors that distinguish network failures, parse errors, and cancellations, improving debugging and reliability for REST API interactions.
Offers request mocking without method swizzling, making unit and integration testing straightforward and safe for production builds, as described in the Mocking section.
Applies smart cache policies to JSON responses to prevent inappropriate caching of REST API data, enhancing performance without manual intervention.
Configurable retry behavior for failed requests with safe handling of idempotent and non-idempotent operations, increasing network reliability as per the design goals.
The repository is archived and maintenance has shifted to a fork, which could lead to fragmentation, slower updates, and reduced official support for long-term projects.
Requires PMJSON for JSON parsing, adding an external dependency and potential integration overhead compared to frameworks with built-in or more flexible JSON handling.
Demands configuration and understanding of its design philosophy, such as environment setup and thread safety, which might be overkill for simple networking tasks that URLSession alone could handle.
Admits missing functionality for non-REST needs (per the README's TODO issues), such as no built-in support for WebSockets or GraphQL, limiting its use in diverse networking scenarios.