Resolution of JSON
Pre-release
Pre-release
Along with some working example code in /example, the main feature added to this development release is the ability to resolve JSON responses, as with the client-side fetch API.
This means that if you are expecting a response to be a JSON document, returning $response->json()
will resolve a promise that will receive the pre-decoded JSON object for use.
Check out example/02-post-request.php
for example code showcasing this.