我有一个WCf rest服务,它具有两个输入参数:string和Stream:
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "ImportStream/{Separator}", ResponseFormat =
WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
void ImportStream(string Separator, stream data);
我的代码:
public void ImportStream (string Separator, Stream inputpar)
{ //...
}
我的目标是使用POSTMAN调用服务:https://localhost:44355/ServiceLias.svc/rest/ImportStream/Comma
并且在主体中,我将Stream编写为Text,
但是我从一开始就有错误:
For request in operation ImportStream to be a stream the operation must have a single parameter whose type is Stream.
我该如何解决?或者有什么想法可以实现我的目标?谢谢,