I'm watching the Stanford CS193p lecture video. The instructor used both downloadTaskWithRequest:
and downloadTaskWithURL:
when downloading some photos from Flickr. I'm a bit confused.
I looked up the former in the documentation, which speaks of the NSURLRequest
as "An NSURLRequest
object that provides the URL, cache policy, request type, body data or body stream, and so on".
I have no idea what "body data" or "body stream" means. It would be fantastic if anyone could help a bit on that, but more important is the problem below.
It seems to me that either method would work just fine according to my experience (which isn't much). I'm intrigued to know what, if any, is the difference between the two, and on which occasions should I pick one over another.