I want to ask if can I use an HttpUrlConnection class to connect once to server and then inside a loop and with the same instance send many request to a web service?
What about "persistence connections"?
It already uses HTTP 1.1 persistent connections and a TCP connection pool behind the scenes. There is nothing to be gained from trying to re-implement that yourself and you won't succeed. HttpURLConnection can be used for exactly one request and one response. The underlying TCP connection is reused until you call disconnect(), but there's not much control you can exert over that.