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

2
  • Are you getting an error message? Commented Jul 17, 2009 at 16:10
  • I am doing someting like {"stream" : data} as the body Commented Jul 17, 2009 at 17:02

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.