Http Post Format for WCF Restful Service

Posted by nextgenneo on Stack Overflow See other posts from Stack Overflow or by nextgenneo
Published on 2010-12-25T11:45:04Z Indexed on 2010/12/25 11:54 UTC
Read the original article Hit count: 261

Filed under:
|
|
|

Hey, super newbie question. Consider the following WCF function:

[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
public class Service1
{
     private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();

     [WebInvoke(UriTemplate = "", 
                Method = "POST", 
                ResponseFormat = WebMessageFormat.Json,
                RequestFormat = WebMessageFormat.Json,
                BodyStyle = WebMessageBodyStyle.Bare) ]
     public SomeObject DoPost(string someText)
     {
          ...
          return someObject;

In fiddler what would my request headers and body look like?

Thanks for the help.

© Stack Overflow or respective owner

Related posts about c#

Related posts about wcf