using Newtonsoft.Json; namespace DocuMed.PWA.Services.RestServices; public class RestWrapper : IRestWrapper { private static RefitSettings setting = new RefitSettings(new NewtonsoftJsonContentSerializer(new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore, })); public ICrudApiRest CrudApiRest(string address) where T : class { return RestService.For>(address, setting); } public ICrudDtoApiRest CrudDtoApiRest(string address) where T : class where TDto : class { return RestService.For>(address, setting); } public IAuthRestApi AuthRestApi => RestService.For(Address.AuthController, setting); public ISectionRestApi SectionRestApi => RestService.For(Address.SectionController, setting); public IUserRestApi UserRestApi => RestService.For(Address.UserController, setting); }