Question

I am trying to use NSURLRequest with NSURLConnection to establish a binary stream connection to an HTTP server to retrieve a humungous data file in small, incrementally pieces.

I see the method - (NSInputStream *)HTTPBodyStream on NSURLRequest. Is that the method I want to call on my instance of NSURLRequest? If so why does it alway return nil?

Was it helpful?

Solution

To get data back u must send request using nsurlconnection, u can use either asynchronous or sync requests here is a link http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html

OTHER TIPS

Actually, I now realize that HTTPBodyStream is relevant when doing an HTTP PUT. I am doing a GET. Never mind.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top