post object to wcf rest service

Posted by gleasonomicon on Stack Overflow See other posts from Stack Overflow or by gleasonomicon
Published on 2011-01-06T15:46:12Z Indexed on 2011/01/06 15:53 UTC
Read the original article Hit count: 224

Filed under:
|

I'm using the WCF Rest service application project template in visual studio. I'm just learning about REST, and I was wondering how I would post a SampleItem object to the following method:

[WebInvoke(UriTemplate = "", Method = "POST")]
public SampleItem Create(SampleItem instance)
{
   // TODO: Add the new instance of SampleItem to the collection
   throw new NotImplementedException();
}

I get the general concepts of gets for the purposes of grabbing data, but I'm not sure how I would post the object in code (or just through a browser for testing) to the service.

© Stack Overflow or respective owner

Related posts about wcf

Related posts about rest