У меня есть служба отдыха WCf, у которой есть два входных параметра: строка и поток:
[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
и в теле я записываю поток в виде текста,
, но у меня есть ошибка из начало:
For request in operation ImportStream to be a stream the operation must have a single parameter whose type is Stream.
Как это исправить? Или есть идея достичь моего объектива? Спасибо,