This package offers a few PSR-7 Http Message utilities.
Amongst the utilities are request and response serializers, able to serialize a to string
or array
.
$factory = $this->getHttpSerializerFactory();
$serializer = $factory->make($response);
echo (string) $serializer;
// Example Output:
//
// HTTP/1.1 201 Created
// Content-Type: application/json
//
// {"id":458712,"name":"Sven Jr.","age":27}
Please read the official documentation for additional information.
The mono repository is located at github.com/aedart/athenaeum
This package follows Semantic Versioning 2.0.0
BSD-3-Clause, Read the LICENSE file included in this package