withinboredom/response-code

A simple response code enum library

v1.0 2022-06-29 07:16 UTC

This package is auto-updated.

Last update: 2024-10-29 06:36:36 UTC


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.