withinboredom / response-code

This is a simple library for creating http responses in bare bones php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A super simple http response code library

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.

About

This is a simple library for creating http responses in bare bones php

License:MIT License


Languages

Language:PHP 100.0%