webapi设置一个Action同时支持get和post请求

2021-03-10 16:27

阅读:439

标签:nbsp   webapi   请求   post请求   pre   proxy   pos   一个   ram   

[AcceptVerbs("GET", "POST")]
public HttpResponseMessage Http([FromUri]ProxyHttpParam getParam, ProxyHttpParam postParam)
{
    var res = new HttpResponseMessage(HttpStatusCode.OK);
    return res;
}

 

webapi设置一个Action同时支持get和post请求

标签:nbsp   webapi   请求   post请求   pre   proxy   pos   一个   ram   

原文地址:https://www.cnblogs.com/sntetwt/p/12683329.html


评论


亲,登录后才可以留言!