User UriBuilder instead (this will escape spaces in the uri for instance).