mardi 26 mars 2019

Retrieve JSON data from url using composer and packagist

I am working on refactoring a technical test my employer has been using for a while and trying to make the test make some sense for new candidates. The test involves building a Laravel 5 application with Vue.JS as a front end. The Laravel and Vue.JS parts present no problem for me however there is a strange requirement for retrieving data from an external API.

Normally I would just use something like Guzzle, HTTP Client of Curl but the test specifically states that these must not be used.

Instead the test instructs the candidates to us Composer and [Packagist] for external requests (to retrieve the data from a given URL). I have only ever used composer as a package manager and not to retrieve JSON data from a URL endpoint.

Can anyone give me an idea or a link to a tutorial how this could be achieved?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire