Installation
Install HTTP with Composer.
shell
composer require raxos/httpRequirements
- PHP 8.5 or newer.
- The following PHP extensions:
ext-ctypeext-fileinfoext-mbstring
Raxos dependencies
HTTP builds on a handful of other Raxos packages:
- contract: the interfaces that
HttpRequest, the responses, the client and the validator implement. - datetime: the
Date,DateTimeandTimevalidation constraints return raxos/datetime value objects. - error: all client and validation exceptions extend the base
Raxos\Error\Exceptionclass. - foundation:
HttpRequest::ip()returns a raxos/foundationIPvalue object and the collection maps back the request.
The package also pulls in guzzlehttp/guzzle for the outgoing client, plus the psr/http-client, psr/http-factory and psr/http-message interfaces for the PSR bridge.
raxos/database
The Model and ModelArray validation constraints resolve request values into database ORM models. That package is only required when you use those two constraints, so it is a development and suggested dependency rather than a hard requirement.
Return to the HTTP introduction.