Yes, this approach seems okay. You could use get_transport() which will also return _transport property of the ClientDataSource.
The client-side API does not expose separate methods for configuration of the URL because this is generally expected to be a static setting when you are making a request to a web service. And additional options can be passed as parameters to the web service call in the HTTP request.
If you are using Web API to retrieve data the approach for dynamic changes of the request URL in the ClientDataSource is indeed more appropriate in this case.