webapi中获取HttpContext
2021-01-24 18:15
标签:request webapi eid span log div style request对象 public webapi中获取HttpContext 标签:request webapi eid span log div style request对象 public 原文地址:https://www.cnblogs.com/fanfan-90/p/12043705.htmlpublic 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
文章链接:http://soscw.com/index.php/essay/46440.html