Blazor   使用WebApiClientCore报错
是因为Json格式化时候  日期时间中间必须要带T   解决方案就是yyyy-MM-dd HH:mm:ss  中间增加个T
//解决方案
改成yyyy-MM-ddTHH:mm:ss

x
 
1
builder.Services.AddHttpApi<IServiceTest>(c =>
2
            {
3
                //设置请求前缀为当前的域名
4
                c.HttpHost = new Uri(builder.HostEnvironment.BaseAddress);
5
                // 报错则或者整个去掉  或者格式化字符串增加T
6
                c.JsonSerializeOptions.Converters.Add(new JsonLocalDateTimeConverter("yyyy-MM-ddTHH:mm:ss"));
7
            });

相关文章:

  • 2021-07-05
  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
猜你喜欢
  • 2022-12-23
  • 2021-10-25
  • 2022-03-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案