A pretty simple question, but failed to find any proper answer for it;
Is it possible to set a specific port to use when doing a (GET) http request with Volley as library?
A pretty simple question, but failed to find any proper answer for it;
Is it possible to set a specific port to use when doing a (GET) http request with Volley as library?
Yes. But some source code editing is required.
Volley's RequestQueue
uses either an HttpClientStack
for Android version 8, or a HurlStack
for 9 and up, to perform the actual request. In both of these classes, the string you provide as a URL when you create a request is turned into a URL
or URI
object. You can edit their constructors to set the port you want.