withinboredom / response-code
A simple response code enum library
Installs: 1 131
Dependents: 2
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: >=8.1
README
This is a simple library for creating http responses in bare bones php.
Installation
composer require withinboredom/response-code
Usage
<?php require_once 'vendor/autoload.php'; use function Withinboredom\ResponseCode\http_response_code; use Withinboredom\ResponseCode\HttpResponseCode; http_response_code(HttpResponseCode::Accepted);
More information
The response codes are based on RFC 9119 which took effect in June 2022.