I have a class that includes a Uri instance. The class is sent as an argument to REST api
[Serializable]
public class SomeClass
{
public Uri Uri { get; set; }
}
public interface IRefitExample
{
[Post("/api/example")]
Task<string> Example(SomeClass someClass);
}
For some reason the Uri object does not pass correctly with refit.
The Uri absolute url string looks like this on the client side:
"file:///var/share"
When it reach to the server it looks like this:
"/var/share"
The refit initialization looks like this:
var settings = new RefitSettings(new NewtonsoftJsonContentSerializer());
_apiRefit = RestService.For<ISomeApi>($"http://localhost:5000", settings);
Thanks.