As part of some code clean up we changed the client from the JsonServiceClient to the newer JsonHttpClient. Nothing else was changed in the client of server service.
When calling a simple GetAsync with JsonServiceClient, all works as expected. When using the JsonHttpClient I receive the following error.
System.MissingMethodException: ‘Method not found: ‘System.String ServiceStack.UrlExtensions.ToUrl(System.Object, System.String, System.Func`2<System.Type,System.String>)’.’
My client code is very simple.
public async Task PullRates()
{
const string url = “https://service.abc.com/”;var client = new JsonHttpClient(url); var reqdCurrencies = GetRequiredCurrencies(); return await client.GetAsync(new GetRates{ BaseCurrency = _settings.BaseCurrency, RequiredCurrencies = reqdCurrencies });
}
Am I doing something wrong? If so, what?
FYI, we are using .Net 6 in this project.