I need to write a lib, which does many remote HTTP calls to fetch a content. I could do it as described here, but is there a better way (in sense of performance) how to do it? If I do it as described in example I do always create an URL object, which is parsed and so on – so I think it kind of overhead: base URL is always the same, just single parameter is always different, e.g.:
http://www.example.com/?param=value1
http://www.example.com/?param=value2
http://www.example.com/?param=value3
and so on...
What would be more faster/better way?
Use HttpClient and normal form semantics; you may just be able to overwrite the parameter value.
OTOH, compared to network speed, I find it difficult to believe that URL parse time will be the gating issue. Other than that, you could spin up multiple request threads.