The best way to organize the sequence of http requests

Hello!


I have several http requests. Each request returns json stucture and then I have to parse json and add information to my core data model. But I can't add some information to core data, because this information refers to the data returned from another request. How can I better organize to some requests were made only after the others are already returned data? What is the best way in this case?


Best regards,

Aleksey.

I do this by putting each request in a separate NSOperation and then using NSOperation dependencies to ensure an appropriate ordering. For a high-level discussion of this technique, see WWDC 2015 Session 226 Advanced NSOperations.

You should also read this thread, where I posted my latest spin on this technique.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
The best way to organize the sequence of http requests
 
 
Q