A lightweight PHP package that provides an object-oriented layer for handling HTTP requests, responses, cookies, and file uploads.
This library uses PSR-4 autoloading. Recommended installation via Composer:
composer require binaryceo/http-foundation
If you are developing the library and want to run tests:
composer install
require 'vendor/autoload.php';
use BinaryCEO\Component\Http\Request;
$request = Request::fromGlobals();
echo $request->method();
echo $request->uri();
echo $request->input('name');
To run the PHPUnit test suite locally:
composer install
composer test
If you don't want to use Composer, there's a minimal CLI test runner at tests/RequestTest.php
(but PHPUnit is recommended).
- Fork the repository
- Create a feature branch
- Send a pull request
This project is licensed under the MIT License.
See the LICENSE file for details.