Download the PHP package nilportugues/api-problems without Composer
On this page you can find all versions of the php package nilportugues/api-problems. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nilportugues/api-problems
More information about nilportugues/api-problems
Files in nilportugues/api-problems
Package api-problems
Short Description PSR7 Response implementation for the Problem Details for HTTP APIs
License MIT
Homepage http://nilportugues.com
Informations about the package api-problems
PSR7 HTTP APIs Problem Response
PSR7 Response implementation for the Problem Details for HTTP APIs (RFC7807) specification.
Usage
To report a single error, all you need to do is pass in the mandatory parameters and you'll be fine.
Straightforward usage (recommended)
This is probably the fastest way and it's really convenient as it hides the presenter and creating the instances from you.
Using the constructor and handling the response yourself.
Using an Exception and handling the response yourself.
Multiple Problems, one object
In order to report more than problem, you must use the additional details parameter.
JSON Output
Headers
Body
XML Output
Headers
Body
Contribute
Contributions to the package are always welcome!
- Report any bugs or issues you find on the issue tracker.
- You can grab the source code at the package's Git repository.
Support
Get in touch with me using one of the following means:
- Emailing me at [email protected]
- Opening an Issue
Authors
License
The code base is licensed under the MIT license.
All versions of api-problems with dependencies
guzzlehttp/psr7 Version ^1.3
nilportugues/assert Version ^1.0