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

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

 

posted @ 2020-04-12 00:35  microsoftzhcn  阅读(1029)  评论(0编辑  收藏  举报