我可以使用邮递员在 wcf 休息服务中使用该方法。
但是当我点击 API 时我正在使用 JIRA webhook 它给了我 400 错误
Client error - 400 when posting to web hook at 'http://localhost:12456/JiraRestWebhook.svc/GetData/TES-217?user_id=james&user_key=jamesD'
我的方法如下:
[OperationContract]
[WebInvoke(BodyStyle = WebMessageBodyStyle.Wrapped,
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json
, UriTemplate = "GetData/{value}"
)]
string GetData(string value, Stream c);
我可以使用邮递员成功地击中它。该请求还包含原始数据。
但是我的 JIRA webhook 在更新/创建任何问题时给出了这个错误。
请注意:- 如果我从方法中删除 Stream Param。那么我的服务就能给我结果。