enigma-php / http
A simple supportive package for working with http requests
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Forks: 0
Type:libary
pkg:composer/enigma-php/http
Requires
- php: ^8.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.53
- phpstan/phpstan: ^1.10
- phpstan/phpstan-strict-rules: ^1.5
- phpunit/phpunit: ^11.1
This package is not auto-updated.
Last update: 2025-12-13 01:26:48 UTC
README
EnigmaPHP Http is a small and simple supportive package for working with http requests and responses.
Installing EnigmaPHP Http
composer require enigma-php/http
Usage
Enums
RequestMethod : This class (enum) represents a RequestMethod and therefore contains 9 cases.
Example :
RequestMethod::GET
#with value, results in GET
RequestMethod::GET->value
ResponseStatus: This class (enum) represents a ResponseStatus and therefore contains a large number of cases with a specific response status.
From each status we can use :
- The numeric value representation with :
`ResponseStatus::OK->value` - The Explanation like
OKwith :`ResponseStatus::OK->getExplanation()` - The status class like
Successfulwith :`ResponseStatus::OK->getStatusClass()`