A simplified, lightweight HTTP client library for PHP, providing utility methods for all HTTP verbs and built-in JSON parsing.
Unirest for PHP is a lightweight HTTP client library that simplifies making HTTP requests in PHP applications. It provides a clean, intuitive API for interacting with RESTful APIs and web services, handling common tasks like authentication, JSON parsing, and file uploads with minimal configuration. The library wraps cURL functionality to offer a more developer-friendly experience.
PHP developers building applications that consume REST APIs, web services, or need to make HTTP requests to external services. It's particularly useful for those who want a simpler alternative to native cURL or Guzzle for basic to intermediate HTTP client needs.
Developers choose Unirest for its dead-simple API that reduces boilerplate code, built-in JSON parsing that eliminates manual decoding, and comprehensive feature set including multiple authentication methods and file upload support—all in a lightweight package with minimal dependencies.
Unirest in PHP: Simplified, lightweight HTTP client library.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides utility methods for all HTTP verbs with a clean, intuitive interface, reducing boilerplate code compared to raw cURL, as shown in the README examples.
Supports Basic, Digest, NTLM, and Negotiate authentication natively, handling complex auth schemes automatically with methods like Request::auth.
Parses JSON responses into native PHP objects or arrays, eliminating manual json_decode calls, and allows custom JSON decode flags for flexibility.
Facilitates multipart file uploads with helper methods like Body::multipart and Body::file, making it easy to handle files without manual cURL setup.
The project is explicitly marked as 'Not Maintained' on GitHub, meaning no bug fixes, security patches, or updates for newer PHP versions, which poses risks for production use.
Some authentication methods are deprecated and scheduled for removal (e.g., old username/password parameters), leading to potential breaking changes if not updated.
Does not follow PSR-7 or PSR-18 standards, making it incompatible with many modern PHP libraries and frameworks that rely on these interfaces for interoperability.