我正在尝试向我的restful WCF服务发出post请求。合同如下所示:
[OperationContract]
[WebInvoke(Method = "POST",
RequestFormat = WebMessageFormat.Json,
ResponseFormat=WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped,
UriTemplate = "UploadMovie")]
string UploadMovie(Stream stream);
或
[OperationContract]
[WebInvoke(Method = "POST",
RequestFormat = WebMessageFormat.Json,
ResponseFormat=WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped,
UriTemplate = "UploadMovie")]
string UploadMovie(byte [] stream);
我正在尝试使用
Fiddler
提出一个请求,但我无法通过在请求中加入一些人来实现它。身体需要什么样子?我一直在写正确的Json在身体,但仍然没有好。。。
谢谢