我使用 WCF REST 服务模板 40(CS) 创建了一个网站,它具有如下服务方法:
[WebInvoke(UriTemplate = "CTNotification", Method = "POST", ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json)]
public string CTNotification(Stream contents)
如何将 json 传递给它?我无法将服务参数设为字符串,因为客户端会将 json 作为流发送。如何使用 C# 对此服务方法进行后调用,内容类型 = application/json
问候, 阿西夫·哈米德