I want to do a web service call on a separate thread. I am using the below code,
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// My web service request goes from here
});
The request goes successfully, however there is no response coming back, I am not able to figure out why.
If I use
dispatch_async(dispatch_get_main_queue(), ^{
// My Web service request goes from here
});
Response is coming back but UI is blocked till then, I want to do the web service request in a separate thread without blocking the UI.