Download the PHP package caridea/http without Composer
On this page you can find all versions of the php package caridea/http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package http
Short Description A shrimp of an HTTP utility library
License Apache-2.0
Homepage http://github.com/libreworks/caridea-http
Informations about the package http
caridea-http
Caridea is a miniscule PHP application library. This shrimpy fellow is what you'd use when you just want some helping hands and not a full-blown framework.
This is its HTTP component. It includes small utilities for working with PSR-7 HTTP requests and responses, including:
- An implementation of RFC 7807, "Problem Details for HTTP APIs".
- A utility to parse common pagination parameters from the request
- A utility to correctly parse query strings with multiple parameters having the same name
- A utility to determine a client's preferred accepted MIME type
Installation
You can install this library using Composer:
- The master branch (version 3.x) of this project requires PHP 7.1 and depends on
psr/http-message
. - Version 2.x of this project requires PHP 7.0 and depends on
psr/http-message
. - Version 1.x of this project requires PHP 5.5 and depends on
psr/http-message
.
Compliance
Releases of this library will conform to Semantic Versioning.
Our code is intended to comply with PSR-1, PSR-2, and PSR-4. If you find any issues related to standards compliance, please send a pull request!
Documentation
- Head over to Read the Docs
Examples
Just a few quick examples.
Problem Details
We included an implementation of RFC 7807 that you can serialize to JSON or append to a PSR-7 HTTP Response.
Pagination Factory
Accept Types
Helper Traits
Two traits are now available, JsonHelper
and MessageHelper
. These can be used by controller classes or dispatcher middleware.
Third-Party
The traits JsonHelper
and MessageHelper
(as well as their unit tests) were ported to PHP from the Labrys library under a compatible Apache 2.0 license.