Hey Dennis! You are absolutely right, Services are the best candidates to make API calls. And yes, if the data is served by the remote API, you don’t have to (and won’t be able to, actually) inject the data itself into the service. You may, however, consider injecting light-weight libraries that help you deal with that requests. In this example, I omitted the remote APIs case for simplicity purpose.

Written by

Software Engineer with about 15 years of experience in front- and back-end web development, and I know how to cook this dish!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store