tags:

views:

606

answers:

1

I am trying to make a post request to my restful WCF service. The contract looks like this:

    [OperationContract]
    [WebInvoke(Method = "POST",
                 RequestFormat = WebMessageFormat.Json,
                 ResponseFormat=WebMessageFormat.Json,
               BodyStyle = WebMessageBodyStyle.Wrapped,
               UriTemplate = "UploadMovie")]
    string UploadMovie(Stream stream);

or

    [OperationContract]
    [WebInvoke(Method = "POST",
                 RequestFormat = WebMessageFormat.Json,
                 ResponseFormat=WebMessageFormat.Json,
               BodyStyle = WebMessageBodyStyle.Wrapped,
               UriTemplate = "UploadMovie")]
    string UploadMovie(byte [] stream);

I am trying to use Fiddler to make a request, yet I am not able to get it to work by putting some body in the request. What does the body need to look like? I have been writing the correct Json in the body but still no good...

Thanks

+1  A: 

My problem was that i w as not setting the content-type in the post header

Daniel