I'm attempting to write a Moodle plugin which accesses a RESTful web service external to the Moodle instance. I'd like to use external libraries for the HTTP client and for the code which processes the responses.
Ideally, I would install these libraries using composer. But how do I incorporate a composer download into the plugin? Should I be distributing the vendor libraries with my code (which has licensing implications)? Or can I get Moodle to run a post-install script as part of the plugin install, which will call composer in the correct directory and download the dependencies?
Thanks.