How would I get returningResponse
(into say, a NSString) from the following code:
NSURLResponse* response;
NSError* error;
NSData* result = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response error:&error];
I think I can get the info that I need into a string but I can't call anything on response
because it's null. Therefore, I assume that I need to call something on result
. The problem is, I don't know what to call.
(The URL request has been coded prior to the code sample. I know that that works.) I want to be able to detect if the request as successful.