{"id":26606861,"url":"https://github.com/rmuchall/http-status-ts","last_synced_at":"2025-03-23T22:23:48.116Z","repository":{"id":57268388,"uuid":"288725117","full_name":"rmuchall/http-status-ts","owner":"rmuchall","description":"HTTP status codes for TypeScript.","archived":false,"fork":false,"pushed_at":"2024-03-04T08:00:30.000Z","size":730,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-06T05:37:54.809Z","etag":null,"topics":["codes","http","status","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmuchall.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-19T12:24:23.000Z","updated_at":"2022-11-09T07:56:52.000Z","dependencies_parsed_at":"2022-09-02T02:50:18.854Z","dependency_job_id":null,"html_url":"https://github.com/rmuchall/http-status-ts","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmuchall%2Fhttp-status-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmuchall%2Fhttp-status-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmuchall%2Fhttp-status-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmuchall%2Fhttp-status-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmuchall","download_url":"https://codeload.github.com/rmuchall/http-status-ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245176660,"owners_count":20572974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codes","http","status","typescript"],"created_at":"2025-03-23T22:23:47.512Z","updated_at":"2025-03-23T22:23:48.079Z","avatar_url":"https://github.com/rmuchall.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub](https://img.shields.io/github/license/rmuchall/http-status-ts)\n![npm bundle size](https://img.shields.io/bundlephobia/minzip/http-status-ts)\n![npm](https://img.shields.io/npm/v/http-status-ts)\n\n## What is http-status-ts?\nhttp-status-ts is a tiny helper library that provides a convenient list of HTTP status codes for use with TypeScript. It is isomorphic and can be used with NodeJs or in a browser. \u003cbr /\u003e\n\n## Installation\nInstall the [http-status-ts package](https://www.npmjs.com/package/http-status-ts) from npm. \u003cbr/\u003e\n`npm install http-status-ts`\n\n## Usage\nHTTP status codes are provided as an enum. \u003cbr /\u003e\n```typescript\nconsole.log(HttpStatus.INTERNAL_SERVER_ERROR);\n// =\u003e 500\n```\nYou can also obtain a text description. \u003cbr /\u003e\n```typescript\nconsole.log(httpStatusTextByCode(HttpStatus.INTERNAL_SERVER_ERROR));\n// =\u003e \"Internal Server Error\"\n```\n\n## HTTP Status Codes\nAll [http status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) are included. \u003cbr /\u003e\n\n| Enum                            | Code | Text                            | \n|---------------------------------|------|---------------------------------|\n| CONTINUE                        | 100  | Continue                        |\n| SWITCHING_PROTOCOLS             | 101  | Switching Protocols             | \n| PROCESSING                      | 102  | Processing                      |\n| EARLY_HINTS                     | 103  | Early Hints                     | \n| OK                              | 200  | OK                              |\n| CREATED                         | 201  | Created                         |\n| ACCEPTED                        | 202  | Accepted                        |\n| NON_AUTHORITATIVE_INFORMATION   | 203  | Non-Authoritative Information   |\n| NO_CONTENT                      | 204  | No Content                      |\n| RESET_CONTENT                   | 205  | Reset Content                   |\n| PARTIAL_CONTENT                 | 206  | Partial Content                 |\n| MULTI_STATUS                    | 207  | Multi-Status                    |\n| ALREADY_REPORTED                | 208  | Already Reported                |\n| IM_USED                         | 226  | IM Used                         |\n| MULTIPLE_CHOICES                | 300  | Multiple Choices                |\n| MOVED_PERMANENTLY               | 301  | Moved Permanently               |\n| FOUND                           | 302  | Found                           |\n| SEE_OTHER                       | 303  | See Other                       |\n| NOT_MODIFIED                    | 304  | Not Modified                    |\n| USE_PROXY                       | 305  | Use Proxy                       |\n| TEMPORARY_REDIRECT              | 307  | Temporary Redirect              |\n| PERMANENT_REDIRECT              | 308  | Permanent Redirect              |\n| BAD_REQUEST                     | 400  | Bad Request                     |\n| UNAUTHORIZED                    | 401  | Unauthorized                    |\n| PAYMENT_REQUIRED                | 402  | Payment Required                |\n| FORBIDDEN                       | 403  | Forbidden                       |\n| NOT_FOUND                       | 404  | Not Found                       |\n| METHOD_NOT_ALLOWED              | 405  | Method Not Allowed              |\n| NOT_ACCEPTABLE                  | 406  | Not Acceptable                  |\n| PROXY_AUTHENTICATION_REQUIRED   | 407  | Proxy Authentication Required   |\n| REQUEST_TIMEOUT                 | 408  | Request Timeout                 |\n| CONFLICT                        | 409  | Conflict                        |\n| GONE                            | 410  | Gone                            |\n| LENGTH_REQUIRED                 | 411  | Length Required                 |\n| PRECONDITION_FAILED             | 412  | Precondition Failed             |\n| PAYLOAD_TOO_LARGE               | 413  | Payload Too Large               |\n| URI_TOO_LONG                    | 414  | URI Too Long                    |\n| UNSUPPORTED_MEDIA_TYPE          | 415  | Unsupported Media Type          |\n| RANGE_NOT_SATISFIABLE           | 416  | Range Not Satisfiable           |\n| EXPECTATION_FAILED              | 417  | Expectation Failed              |\n| MISDIRECTED_REQUEST             | 421  | Misdirected Request             |\n| UNPROCESSABLE_ENTITY            | 422  | Unprocessable Entity            |\n| LOCKED                          | 423  | Locked                          |\n| FAILED_DEPENDENCY               | 424  | Failed Dependency               |\n| TOO_EARLY                       | 425  | Too Early                       |\n| UPGRADE_REQUIRED                | 426  | Upgrade Required                |\n| PRECONDITION_REQUIRED           | 428  | Precondition Required           |\n| TOO_MANY_REQUESTS               | 429  | Too Many Requests               |\n| REQUEST_HEADER_FIELDS_TOO_LARGE | 431  | Request Header Fields Too Large |\n| UNAVAILABLE_FOR_LEGAL_REASONS   | 451  | Unavailable For Legal Reasons   |\n| INTERNAL_SERVER_ERROR           | 500  | Internal Server Error           |\n| NOT_IMPLEMENTED                 | 501  | Not Implemented                 |\n| BAD_GATEWAY                     | 502  | Bad Gateway                     |\n| SERVICE_UNAVAILABLE             | 503  | Service Unavailable             |\n| GATEWAY_TIMEOUT                 | 504  | Gateway Timeout                 |\n| HTTP_VERSION_NOT_SUPPORTED      | 505  | HTTP Version Not Supported      |\n| VARIANT_ALSO_NEGOTIATES         | 506  | Variant Also Negotiates         |\n| INSUFFICIENT_STORAGE            | 507  | Insufficient Storage            |\n| LOOP_DETECTED                   | 508  | Loop Detected                   |\n| NOT_EXTENDED                    | 510  | Not Extended                    |\n| NETWORK_AUTHENTICATION_REQUIRED | 511  | Network Authentication Required |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmuchall%2Fhttp-status-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmuchall%2Fhttp-status-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmuchall%2Fhttp-status-ts/lists"}