Re: alternative to NSURLConnection sendSynchronousRequest

2009-01-13 Thread JB
Great suggestion! However, the post method itself sits inside a try-catch-finally statement: @implementation Controller - (void)sync{ @try { NSLog(@"sync has begun"); ... lots of setup, with potential to throw custom errors ... [batch post]; // can throw custom errors too } @cat

Re: alternative to NSURLConnection sendSynchronousRequest

2009-01-13 Thread Shawn Erickson
On Tue, Jan 13, 2009 at 4:13 PM, Jerry Krinock wrote: > > On 2009 Jan, 13, at 14:24, Kevin Gessner wrote: > >> On Jan 13, 2009, at 4:27 PM, JB wrote: >> >>> How can I force my code to wait for the asynchronous request to finish, >>> without using sendSynchronousRequest? >> >> You can split your po

Re: alternative to NSURLConnection sendSynchronousRequest

2009-01-13 Thread Jerry Krinock
On 2009 Jan, 13, at 14:24, Kevin Gessner wrote: On Jan 13, 2009, at 4:27 PM, JB wrote: How can I force my code to wait for the asynchronous request to finish, without using sendSynchronousRequest? You can split your post-connection stuff into another method, and call it from the delegat

Re: alternative to NSURLConnection sendSynchronousRequest

2009-01-13 Thread Kevin Gessner
On Jan 13, 2009, at 4:27 PM, JB wrote: Hi all, I'm building a client for a server with (apparently) weird redirect issues, I cannot get a proper HTTP response using NSURLConnection sendSynchronousRequest However, I can print out the response code using the asynchronous method: [[NSURLCon

alternative to NSURLConnection sendSynchronousRequest

2009-01-13 Thread JB
Hi all, I'm building a client for a server with (apparently) weird redirect issues, I cannot get a proper HTTP response using NSURLConnection sendSynchronousRequest However, I can print out the response code using the asynchronous method: [[NSURLConnection alloc] initWithRequest:request delegate: