Download the PHP package marcoazn89/http-wrapper without Composer
On this page you can find all versions of the php package marcoazn89/http-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download marcoazn89/http-wrapper
More information about marcoazn89/http-wrapper
Files in marcoazn89/http-wrapper
Download marcoazn89/http-wrapper
More information about marcoazn89/http-wrapper
Files in marcoazn89/http-wrapper
Vendor marcoazn89
Package http-wrapper
Short Description An HTTP wraper library
License MIT
Homepage https://github.com/marcoazn89/http-wrapper
Package http-wrapper
Short Description An HTTP wraper library
License MIT
Homepage https://github.com/marcoazn89/http-wrapper
Please rate this library. Is it a good library?
Informations about the package http-wrapper
Install via Composer
composer require marcoazn89/http-wrapper:dev-dev
Features
- PSR-7 compliant response object
- Content negotiation
- Constants to avoid mistyping
- Flexibility to use outside of PSR-7
Create a new response object
Set headers
Negotiate Headers
Set limits on what you can support
The order in which you add support matters! This will ignore any Accept headers that don't match the supported types.
require '../vendor/autoload.php';
use HTTP\Support\TypeSupport;
use HTTP\Response\ContentType;
// Add content you can support
TypeSupport::addSupport([
ContentType::HTML,
ContentType::XML
]);
// Assume the client sent XML as the accept header, the following output will be
// in XML form because it was the best match in the supported types
(new \HTTP\Response())->withTypeNegotiation()->write("<p>Hello World</p>")->send();
All versions of http-wrapper with dependencies
PHP Build Version
Package Version
The package marcoazn89/http-wrapper contains the following files
Loading the files please wait ....