WEPAPI 获取List<T> 参数

Update 1:  170904

  这个问题百度了,发现没有相关的资料可以参考,翻出去找到了解决方案,供参考。

  引用: https://stackoverflow.com/questions/13736680/passing-a-liststring-to-an-mvc-web-api-method-using-the-browser-bar

  服务端: 

  Controller:   

public List<string> Get([FromUri] List<string> parameter)
{...}

  客户端:

  Url:

.../APIName?parameter[]=value1&parameter[]=value2&....

 

  

posted on 2017-09-04 23:52  星小野  阅读(390)  评论(0编辑  收藏  举报