title: iOS - Perform synchronous HTTP request with AFNetworking
body: <p>I'm currently migrating my app from using ASIHTTPRequest to AFNetworking.  I know synchronous requests are to be avoided if possible, but in my app I have just 1 place where I use one.  In the app delegate applicationDidEnterBackground() method I need to run a HTTP request to query data to set the application badge number when the app goes to background.  When run asynchronously this rarely works because the method just drops out and the application is suspended before the HTTP request completes.  With ASIHTTPRequest I used the [request startSynchronous] method and this meant the HTTP request completed 100% every time and the badge was updated correctly.  I see with AFNetworking there is no obvious synchronous option, so can anybody suggest a way it can be used synchronously, or an alternative solution?</p>