Skip to content

Adding a custom UrlProvider

Petter Ekrann edited this page Jan 17, 2019 · 1 revision

If you need another way of providing url's for your services you can replace the UrlProvider by implementing the

public interface IUrlProvider
{
   string GetEndpoint(RpcMethodInfo invokeInfo);
}

Then you can inject it in the setup

serviceCollection.ConfigureHttpApiClient(conf => {
  conf.SetUrlProvider(new YourUrlProvider)
  conf.AddClientFor<Contract.IServiceOne>("http://localhost:5000/");
  });
Clone this wiki locally