I would like an HttpClient instance with a path built-in. So all HttpUriRequest’s provided will have their URI appended not only to the host and port, but also the path.
For example, with an HttpClient configured for http://tempuri.org/path, an HttpUriRequest for some/more will make a request for http://tempuri.org/path/some/more.
Can DefaultHttpClient be configured to do this? If not, is there another HttpClient implementation which can do it?
You could create your own class FixedPathHttpClient which extends the standard HttpClient.
There you can override executeMethod to append your path to the path of the method before passing it to super().