PHPackages                             repat/http-constants - 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. repat/http-constants

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

repat/http-constants
====================

HTTP response codes provided as defined constants.

0.1(7y ago)17.6k1MITPHPPHP &gt;=5.6

Since Apr 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/repat/http-constants)[ Packagist](https://packagist.org/packages/repat/http-constants)[ Docs](http://repat.de)[ RSS](/packages/repat-http-constants/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (1)

http-constants
==============

[](#http-constants)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b5ecfcf2baf8f2151538fb6ab7f53a890dadb5e0084531e45531192b6781e7c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72657061742f687474702d636f6e7374616e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/repat/http-constants)[![Total Downloads](https://camo.githubusercontent.com/281d931b00df7794c3e0097066616ae9583abcc33d0cd68c30bc7bfcb449bdc5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72657061742f687474702d636f6e7374616e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/repat/http-constants)

**http-constants** is a package with a list of HTTP codes. Every constant begins with `HTTP_` and is wrapped in a `if(!defined('HTTP_CODE'))` to avoid conflicts.

Shoutout to [`legendarydrew/http-constants`](https://github.com/legendarydrew/http-constants) for the base of this package.

Installation
------------

[](#installation)

`$ composer require repat/http-constants`

List of Codes
-------------

[](#list-of-codes)

- `HTTP_CONTINUE`: 100
- `HTTP_SWITCHING_PROTOCOLS`: 101
- `HTTP_PROCESSING`: 102
- `HTTP_OK`: 200
- `HTTP_CREATED`: 201
- `HTTP_ACCEPTED`: 202
- `HTTP_NON_AUTHORITATIVE_INFORMATION`: 203
- `HTTP_NO_CONTENT`: 204
- `HTTP_RESET_CONTENT`: 205
- `HTTP_PARTIAL_CONTENT`: 206
- `HTTP_MULTI_STATUS`: 207
- `HTTP_ALREADY_REPORTED`: 208
- `HTTP_IM_USED`: 226
- `HTTP_MULTIPLE_CHOICES`: 300
- `HTTP_MOVED_PERMANENTLY`: 301
- `HTTP_FOUND`: 302
- `HTTP_SEE_OTHER`: 303
- `HTTP_NOT_MODIFIED`: 304
- `HTTP_USE_PROXY`: 305
- `HTTP_RESERVED`: 306
- `HTTP_TEMPORARY_REDIRECT`: 307
- `HTTP_PERMANENTLY_REDIRECT`: 308
- `HTTP_BAD_REQUEST`: 400
- `HTTP_UNAUTHORIZED`: 401
- `HTTP_PAYMENT_REQUIRED`: 402
- `HTTP_FORBIDDEN`: 403
- `HTTP_NOT_FOUND`: 404
- `HTTP_METHOD_NOT_ALLOWED`: 405
- `HTTP_NOT_ACCEPTABLE`: 406
- `HTTP_PROXY_AUTHENTICATION_REQUIRED`: 407
- `HTTP_REQUEST_TIMEOUT`: 408
- `HTTP_CONFLICT`: 409
- `HTTP_GONE`: 410
- `HTTP_LENGTH_REQUIRED`: 411
- `HTTP_PRECONDITION_FAILED`: 412
- `HTTP_REQUEST_ENTITY_TOO_LARGE`: 413
- `HTTP_REQUEST_URI_TOO_LONG`: 414
- `HTTP_UNSUPPORTED_MEDIA_TYPE`: 415
- `HTTP_REQUESTED_RANGE_NOT_SATISFIABLE`: 416
- `HTTP_EXPECTATION_FAILED`: 417
- `HTTP_I_AM_A_TEAPOT`: 418
- `HTTP_MISDIRECTED_REQUEST`: 421
- `HTTP_UNPROCESSABLE_ENTITY`: 422
- `HTTP_LOCKED`: 423
- `HTTP_FAILED_DEPENDENCY`: 424
- `HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL`: 425
- `HTTP_UPGRADE_REQUIRED`: 426
- `HTTP_PRECONDITION_REQUIRED`: 428
- `HTTP_TOO_MANY_REQUESTS`: 429
- `HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE`: 431
- `HTTP_UNAVAILABLE_FOR_LEGAL_REASONS`: 451
- `HTTP_INTERNAL_SERVER_ERROR`: 500
- `HTTP_NOT_IMPLEMENTED`: 501
- `HTTP_BAD_GATEWAY`: 502
- `HTTP_SERVICE_UNAVAILABLE`: 503
- `HTTP_GATEWAY_TIMEOUT`: 504
- `HTTP_VERSION_NOT_SUPPORTED`: 505
- `HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL`: 506
- `HTTP_INSUFFICIENT_STORAGE`: 507
- `HTTP_LOOP_DETECTED`: 508
- `HTTP_NOT_EXTENDED`: 510
- `HTTP_NETWORK_AUTHENTICATION_REQUIRED`: 511

License
-------

[](#license)

- MIT, see [LICENSE](https://github.com/repat/http-constants/blob/master/LICENSE)

Version
-------

[](#version)

- Version 0.1

Contact
-------

[](#contact)

#### repat

[](#repat)

- Homepage:
- e-mail:
- Twitter: [@repat123](https://twitter.com/repat123 "repat123 on twitter")

[![Flattr this git repo](https://camo.githubusercontent.com/7e3f46a36526479d701ef7f90a0f8c3ac2fbab3087446e2a9fceed75cd1ab802/687474703a2f2f6170692e666c617474722e636f6d2f627574746f6e2f666c617474722d62616467652d6c617267652e706e67)](https://flattr.com/submit/auto?user_id=repat&url=https://github.com/repat/http-constants&title=http-constants&language=&tags=github&category=software)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2578d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/405dab243007488e7e7851422e5864a9312aee36058d60f1e6d623232c4d3131?d=identicon)[repat](/maintainers/repat)

---

Top Contributors

[![legendarydrew](https://avatars.githubusercontent.com/u/168335?v=4)](https://github.com/legendarydrew "legendarydrew (1 commits)")[![repat](https://avatars.githubusercontent.com/u/516807?v=4)](https://github.com/repat "repat (1 commits)")

---

Tags

httpresponsehttpsconstantsstatus codenumbersnot founddefineOK

### Embed Badge

![Health badge](/badges/repat-http-constants/health.svg)

```
[![Health](https://phpackages.com/badges/repat-http-constants/health.svg)](https://phpackages.com/packages/repat-http-constants)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.1k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.1k1.0B5.5k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[league/uri

URI manipulation library

1.1k206.4M276](/packages/league-uri)[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

538204.9M23](/packages/league-uri-interfaces)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
