Download the PHP package nimbly/capsule without Composer
On this page you can find all versions of the php package nimbly/capsule. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nimbly/capsule
More information about nimbly/capsule
Files in nimbly/capsule
Package capsule
Short Description Capsule is a simple PSR-7 HTTP message and PSR-17 HTTP factory implementation.
License MIT
Informations about the package capsule
Capsule
Capsule is a simple PSR-7 HTTP message interface and PSR-17 HTTP factory implementation.
Install
HTTP Message (PSR-7)
Request
The Request
object represents an outbound HTTP request your application would like to make, typically to be used with a PSR-18 compliant HTTP client.
ServerRequest
The ServerRequest
object represents an incoming HTTP request into your application, to be used with a PSR-7 compliant HTTP framework or other library.
Creating from globals
Typically, you will want to create a ServerRequest
instance from the PHP globals space ($_SERVER
, $_POST
, $_GET
, $_FILES
, and $_COOKIES
) for your incoming requests. The ServerRequestFactory
provides a static method to create such an instance.
Helpers
The ServerRequest
instance offers helpers to test for and access various request property parameters.
Parsed body helpers
Query param helpers
Uploaded file helpers
Response
The Response
object represents an HTTP response to either a Request
or a ServerRequest
action.
Response Status
Capsule provides a ResponseStatus
helper class with HTTP response codes as constants and reason phrases.
HTTP Factory (PSR-17)
Capsule includes a set of PSR-17 factory classes to be used to create Request
, ServerRequest
, Response
, Stream
, UploadedFile
, and Uri
instances.
RequestFactory
, ServerRequestFactory
, ResponseFactory
, StreamFactory
, UploadedFileFactory
, and UriFactory
.