PHPackages                             shrikeh/teapot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. shrikeh/teapot

ActiveLibrary[HTTP &amp; Networking](/categories/http)

shrikeh/teapot
==============

PHP HTTP Response Status library

3.0.0(2y ago)2782.4M↓15.5%16[1 issues](https://github.com/shrikeh/teapot/issues)20MITPHPPHP &gt;=8.0

Since Apr 2Pushed 1y ago9 watchersCompare

[ Source](https://github.com/shrikeh/teapot)[ Packagist](https://packagist.org/packages/shrikeh/teapot)[ Docs](https://shrikeh.github.io/teapot/)[ RSS](/packages/shrikeh-teapot/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (5)Versions (17)Used By (20)

Teapot
======

[](#teapot)

[![latest_stable_version_img](https://camo.githubusercontent.com/e18427a9381bbabc3c123cb1d68d8ed5e0366144e4abb8ab65a0b9f2152286d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736872696b65682f746561706f742e737667 "Latest Stable Version")](https://packagist.org/packages/shrikeh/teapot "Latest Stable Version")[![license_img](https://camo.githubusercontent.com/670e2bc5a4bd9a7e98d864704d866d68aca91e5ed2a53a37f4d0464a7fafbdeb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736872696b65682f746561706f742e737667 "License")](https://packagist.org/packages/shrikeh/teapot)[![twitter_img](https://camo.githubusercontent.com/25e3507bbe81f763f5792d81fbdb5838660ffe9dcc03235ce5ed4958844bea18/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f747769747465722d253430736872696b65682d626c75652e737667 "@shrikeh on Twitter")](https://twitter.com/shrikeh)

This is a *very* simple library that aims to aid verbosity in any Web-based application by defining clearly the HTTP 1.1 response codes as constants. It includes two main components: an interface, which contains the constants, and an exception specifically for HTTP.

Usage
-----

[](#usage)

### Using the StatusCodes interface

[](#using-the-statuscodes-interface)

Assuming for a moment a PHPUnit test on a cURL client response:

```
