如何将int []作为参数传递给RESTful api方法?

时间:2014-08-06 18:54:01

标签: c# web-services wcf api rest

我有C#RESTful api方法:

    [OperationContract(Name = "GetSeveralTickets")]
    [WebInvoke(Method = "GET",
        ResponseFormat = WebMessageFormat.Json,
        BodyStyle = WebMessageBodyStyle.Bare)]
    string GetTickets(int[] ids);  // int[] cannot be converted by 'QueryStringConverter'.

如何为http-get方法提供int数组?

我需要访问此服务: GET / tickets / show_many?ids = {id1,id2 ...}

0 个答案:

没有答案