我有一个功能性 ucwa 客户端,仅适用于普通消息。根据 lync 文档,需要一个 PUT 请求来更改支持的模式和消息格式,并且需要一个 If-Match 标头来验证该请求是否为过期状态。
例如,一个 GET 请求/ucwa/oauth/v1/applications/102628975647/communication
将返回
{
"9b5c7fdf-2c5f-462e-a4e3-39663f09301a": "please pass this in a PUT request",
"supportedModalities": [],
"supportedMessageFormats": [
"Plain"
],
"_links": {..},/*ommitted for brevity */
"rel": "communication",
"etag": "3010254294"
}
我把它放回去了,带有一个If-Match: 3010254294
标题:
{
"9b5c7fdf-2c5f-462e-a4e3-39663f09301a": "please pass this in a PUT request",
"supportedModalities": [],
"supportedMessageFormats": [
"Plain", "Html"
],
"rel": "communication",
"etag": "3010254294"
}
但是我一直收到一个428 PreconditionRequired
错误,根据文档,这意味着我缺少 If-Match 标头。ETag 和 If-Match 的各种组合也会失败。此请求的正确格式是什么?