in my case, my Yii2 application should not provide an REST API, but it have to act as an REST API client in order to read an write data to an REST service on an different host.
So my question: what is the best practice, to put the code for loading data from an REST Web Service? Is the controller the right place?
Or isn’t the model the place for dealing with data?
Is it possible to connect an model with an remote REST API as data source (out of the box) instead of linking an model to an database (which works out of the box in yii)?
How would you handle this needs?