webapi中获取HttpContext

2021-01-24 18:15

阅读:531

标签:request   webapi   eid   span   log   div   style   request对象   public   

public OperationResultDto APILogin()
        {
LoginModel model = new LoginModel();
HttpContextBase context = (HttpContextBase)Request.Properties["MS_HttpContext"];//获取传统context
HttpRequestBase request = context.Request;//定义传统request对象
model.EID = request.Form["eid"];
model.Password = request.Form["password"];
  }

webapi中获取HttpContext

标签:request   webapi   eid   span   log   div   style   request对象   public   

原文地址:https://www.cnblogs.com/fanfan-90/p/12043705.html


评论


亲,登录后才可以留言!