I have seen some posts in stackoverflow saying "sending list of items in the GET Method, is NOT allowed. It has to be accomplished via POST method only"
My code looks like
[OperationContract] [WebGet(UriTemplate = "Employee/{emp}",RequestFormat=WebMessageFormat.Json)] Employee GetEmpDetails(string emp);
and my input json object will be "{'id':1,'name':'test',....} Is there any alternative way of achieving this issue.
Thanks
It is possible to send list of items with GET, it's just that out of the box only primitive values are supported. String values work just fine, but if you want to pass a complex object, you need to create a custom QueryStringConverter. The post at http://blogs.msdn.com/b/carlosfigueira/archive/2011/08/09/wcf-extensibility-querystringconverter.aspx explains how this can be done.
QueryStringConverter
1.4m articles
1.4m replys
5 comments
57.0k users