NSURLConnection code for posts project