不能直接获取url  使用扩展属性 进行实现

 public static class HttpRequestExtensions
    {
        public static string GetRequestUrl(this HttpRequest source)
        {
            return $"{source.PathBase}{source.Path}{source.QueryString}";
        }
    }

  引用 using Microsoft.AspNetCore.Http

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2021-06-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
相关资源
相似解决方案