Currently, the code below is what I have to make a synchronous HTTP connection with a server. The server basically displays the required UI dialog depending upon the query. Now,