binaryceo/http-foundation

A PHP package for handling HTTP requests and responses in an object-oriented way

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/binaryceo/http-foundation

v1.0.0 2025-09-29 06:17 UTC

This package is auto-updated.

Last update: 2025-12-29 08:03:12 UTC


README

A lightweight PHP package that provides an object-oriented layer for handling HTTP requests, responses, cookies, and file uploads.

Installation

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

Usage

require 'vendor/autoload.php';

use BinaryCEO\Component\Http\Request;

$request = Request::fromGlobals();
echo $request->method();
echo $request->uri();
echo $request->input('name');

Running tests

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).

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Send a pull request

License

This project is licensed under the MIT License.
See the LICENSE file for details.