Closed Mike-E-angelo closed 8 years ago
That's a great idea @Michael-DST!
In the meanwhile, here is a workaround for the C# client. You have access to the normal ASP.NET WebApi Client, just simply set the BaseAddress here:
using (var client = new PeopleClient())
{
client.HttpClient.BaseAddress = new Uri("http://dev.some-other-url.com");
var response = await client.GetAsync();
response.EnsureSuccessStatusCode();
var content = await response.Content.ReadAsAsync<object>();
}
This should be quite easy to add, any chance of a pull request?
Merged with #49
Hello,
I just noticed that generated clients depend on a hard-coded string that also gets generated. This does not account for environment-specific use cases where the URL of the service will change based on the environment. The generated proxies should create constructors that accept both strings and URIs so that the base address can be assigned via configuration based on the target environment. I will definitely be providing a PR for this. :)
Thank you, Michael