Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 559 Bytes

readme.md

File metadata and controls

27 lines (17 loc) · 559 Bytes

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.