enigma-php / http
A simple supportive package for working with http requests
1.0.1
2024-05-03 17:35 UTC
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-06-13 23:02:09 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
OK
with :`
ResponseStatus::OK->getExplanation()`
- The status class like
Successful
with :`
ResponseStatus::OK->getStatusClass()`