Download the PHP package timostamm/json-client without Composer
On this page you can find all versions of the php package timostamm/json-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download timostamm/json-client
More information about timostamm/json-client
Files in timostamm/json-client
Package json-client
Short Description A simple client for JSON APIs using Guzzle and the Symfony Serializer.
License MIT
Informations about the package json-client
json-client
A simple client for JSON APIs using Guzzle and the Symfony Serializer.
To implement a API client, you can extend AbstractApiClient and write your methods, using the Guzzle Http Client to transmit.
All functionality is implemented as middleware, the
AbstractApiClient
just configures the Guzzle HandlerStack
for you.
Provided middleware
Serialization
See DeserializeResponseMiddleware
and SerializeRequestBodyMiddleware
.
Server error messages
ServerMessageMiddleware
provides support for JSON error messages.
Response expectations
If you want to make sure that a response has a specific header, content
type or other feature, use ResponseExpectationMiddleware
.
Logging
There is also middleware to log all HTTP requests (and corresponding
response or exception), see HttpLoggingMiddleware
An adapter for Psr\Log\LoggerInterface
is available.
This middleware is not added by default because the order is
important: The HttpLoggingMiddleware
must be added last.
All versions of json-client with dependencies
guzzlehttp/guzzle Version ^6.5 || ^7.4
symfony/serializer Version ^5.4 || ^6.4
symfony/options-resolver Version ^5.4 || ^6.4