Multiple API requests for text and images

In the iOS Foundations course at Module 6 Lesson 5 I couldn’t get the idea of making another request for the article image. Why do we do that exactly, didn’t we already got the image url of the article?

The initial JSON downloaded from the API Endpoint contains the urlToImage which is just the name of the image and where it is stored at the API endpoint.

To display that image in the cell we need to specifically download the image data from the urlToImage address and load that into the imageView in the cell.

1 Like

I’m used to use it without doing this extra work in React Native so it felt strange at first but I’ll be fine while learning more about native app development thank you for your answer :slight_smile: