This project is read-only.

WebInvoke | Parameter as List<>

Topics: Web Api
Dec 29, 2010 at 11:39 AM


at the moment I'am designing an REST-Interface and now I have a method that stores / updated a collection of key=value pair in the Database. What is the best way to do that....using a List<MyType>, Dictionary<string, string>? I use the WebInvoke (Method = POST) to submit the data.



Jan 7, 2011 at 3:14 PM

Hi Daniel,

I would recommend using application/x-www-form-urlencoded as the media type.  It is designed to handle key value pairs.  The WCF HTTP library has built-in support for this media type.