gleasonomicon
gleasonomicon

Reputation: 1089

post object to wcf rest service

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.

Upvotes: 1

Views: 1099

Answers (1)

RMD
RMD

Reputation: 3253

While not exactly what you asked, this may help:

http://channel9.msdn.com/Shows/Endpoint/endpointtv-WCF-Complex-Type-AJAX-Service-Sample

Upvotes: 1

Related Questions