Download the PHP package saboohy/httpstatus without Composer

On this page you can find all versions of the php package saboohy/httpstatus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package httpstatus

HttpStatus

This is a PHP library for HTTP status codes, messages and error exceptions.

Requirements

Installation

You can install the package via composer:

Usage

Enums

There are 5 enum objects in this library. Info, Success, Redirect, Client and Server.

Informational Responses (1xx)

Cases for informational responses are organized inside of Info enum.

Case Code
CONTINUE 100
SWITCHING_PROTOCOLS 101
PROCESSING 102
EARLY_HINTS 103

Usage

Successful Responses (2xx)

Successful responses are organized inside of Success enum.

Case Code
OK 200
CREATED 201
ACCEPTED 202
NON_AUTHORITATIVE_INFORMATION 203
NO_CONTENT 204
RESET_CONTENT 205
PARTIAL_CONTENT 206
MULTI_STATUS 207
ALREADY_REPORTED 208
IM_USED 226

Usage

Redirection Messages (3xx)

Redirect responses are organized inside of Redirect enum.

Case Code
MULTIPLE_CHOICES 300
MOVED_PERMANENTLY 301
FOUND 302
SEE_OTHER 303
NOT_MODIFIED 304
TEMPORARY_REDIRECT 307
PERMANENT_REDIRECT 308

Usage

Client Error Responses (4xx)

Cases for client error responses are organized inside of Client enum.

Case Code
BAD_REQUEST 400
UNAUTHORIZED 401
FORBIDDEN 403
NOT_FOUND 404
METHOD_NOT_ALLOWED 405
NOT_ACCEPTABLE 406
PROXY_AUTHENTICATION_REQUIRED 407
REQUEST_TIMEOUT 408
CONFLICT 409
GONE 410
LENGTH_REQUIRED 411
PRECONDITION_FAILED 412
PAYLOAD_TOO_LARGE 413
URI_TOO_LONG 414
UNSUPPORTED_MEDIA_TYPE 415
RANGE_NOT_SATISFIABLE 416
EXPECTATION_FAILED 417
IM_A_TEAPOT 418
MISDIRECTED_REQUEST 421
UNPROCESSABLE_ENTITY 422
LOCKED 423
FAILED_DEPENDENCY 424
TOO_EARLY 425
UPGRADE_REQUIRED 426
PRECONDITION_REQUIRED 428
TOO_MANY_REQUESTS 429
REQUEST_HEADER_FIELDS_TOO_LARGE 431
UNAVAILABLE_FOR_LEGAL_REASONS 451
CLIENT_CLOSED_REQUEST 499

Usage

Server Error Responses (5xx)

Cases for server error responses are organized inside of Server enum.

Case Code
INTERNAL_SERVER_ERROR 500
NOT_IMPLEMENTED 501
BAD_GATEWAY 502
SERVICE_UNAVAILABLE 503
GATEWAY_TIMEOUT 504
HTTP_VERSION_NOT_SUPPORTED 505
VARIANT_ALSO_NEGOTIATES 506
INSUFFICIENT_STORAGE 507
LOOP_DETECTED 508
NOT_EXTENDED 510
NETWORK_AUTHENTICATION_REQUIRED 511
NETWORK_READ_TIMEOUT_ERROR 598
NETWORK_CONNECT_TIMEOUT_ERROR 599

Usage

HttpErrorException

This class is used for error exceptions. The "constructor" method of this class must receive a case of enum. Remember that the value you will give must be of type 4xx and 5xx.

Usage

License

The MIT License (MIT). Please, look at License File for more information.


All versions of httpstatus with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package saboohy/httpstatus contains the following files

Loading the files please wait ....