且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

访问 ASP.Net Web Api 中的查询字符串?

更新时间:2023-02-17 09:29:22

查询字符串键名应与动作的参数名匹配:

The query string key name should match the parameter name of the action:

/api/values?queryString=f

/api/values?queryString=f

public IEnumerable<string> Get(string queryString)
    {
        return new string[] { "value3", "value4" };
    }