Answer the question
In order to leave comments, you need to log in
How to speed up the process of connecting to the server through HttpUrlConnection?
I have a class in which I establish a connection with the server before each request (httpUrlConnection.openConnection(URL)) : each request has its own URL, so there is a connection delay before each request and in general this process takes too much time compared to the Web . And one more thing: you have to hardcode for each request (zero and redefine HttpUrlConnection, URL, headers, etc.). I don’t even fit in my head how to make 1 class with a method on POST and a method on GET requests.
Who has ideas how to organize the class correctly?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question