em4nl / uresponse
A simple library of HTTP responses
Installs: 130
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
pkg:composer/em4nl/uresponse
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2025-09-29 02:09:05 UTC
README
A simple library of HTTP Responses
Installation
Via composer:
composer require em4nl/uresponse
Usage
Assuming you're using autoloading and your composer vendor dir is
at ./vendor:
<?php require_once __DIR__ . '/vendor/autoload.php'; use Em4nl\U; // send a 200 response U\ok('hello, world!'); // 404 U\not_found('this page exists not :('); // 301 U\moved_permanently('https://example.com/'); // 302 U\found('https://example.com/');
Development
Install dependencies
composer install
Run tests
./vendor/bin/phpunit tests