在Outlook REST API中使用ExtendedProperties设置邮件项标题 [英] using ExtendedProperties in the Outlook REST API to set Message item headers

查看:194
本文介绍了在Outlook REST API中使用ExtendedProperties设置邮件项标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以在C#API中请求消息标头:

It is possible to request message headers in the C# API:

https://msdn.microsoft.com/zh-CN/library/microsoft.exchange.webservices.data.item.internetmessageheaders(exchg.80).aspx

是否可以通过ExtendedProperties使用REST API 设置项目消息标题?

Is it possible to set item message headers instead, using the REST API via ExtendedProperties ?

这将使我们能够删除我们必须做的最后一个EWS SOAP调用,即在Outlook草案中添加标头.

This would allow us to remove the last remaining EWS SOAP call we have to do, which is to add a header to an Outlook draft.

想要这个的原因:

  • 显然,EWS SOAP API的故障率似乎是10%-20%,这是很多的:

这些是来自最近失败的SOAP请求的响应标头,用于设置项目标头:

these are the response headers from a recent failed SOAP request to set item headers:

HTTP/2.0 200 OK cache-control: no-cache, no-store pragma: no-cache content-length: 292 content-type: application/json; charset=utf-8 content-encoding: gzip expires: -1 vary: Accept-Encoding p3p: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI" set-cookie: OpenIdConnect.token.v1=AQAAAOADAADFvAnVWFaCHx5XIFrC14By45JdwIaJciEmq6QxjeEkDuu2FkvvzPTFQT48FfepaPUSJwOYaWPsN17BxG86W2EdRhra3LCEm0I7uqQ==; path=/; secure; HttpOnly X-OWA-CANARY=rLiI6SI6hEG8TKmFC33h0nDLEd7HytUY6h5Nd5-yklT1lwE6CMOtZ4E6DlBkS8aT6hvMlUUzYRM.; path=/; secure request-id: c1fcc6a9-e5f7-4376-8601-ed818121c114 x-calculatedbetarget: VI1PR01MB1245.eurprd01.prod.exchangelabs.com x-backendhttpstatus: 200 x-rum-validated: 1 x-content-type-options: nosniff x-ms-appid: 00000002-0000-0ff1-ce00-000000000000 x-owa-version: 15.20.820.15 x-owa-owsversion: V2018_01_18 x-owa-minimumsupportedowsversion: V2_6 x-owa-httphandler: true x-owa-diagnosticsinfo: 83;0;0 x-owa-correlationid: EEA57A52016E48BD82069FA4CF1379A5_152819141147695 x-owa-clientbegin: 2018-06-05T09:36:51.476 x-frontend-begin: 2018-06-05T09:36:51.464 x-backend-begin: 2018-06-05T09:36:51.564 x-backend-end: 2018-06-05T09:36:51.658 x-diaginfo: VI1PR01MB1245 x-beserver: VI1PR01MB1245 x-ua-compatible: IE=EmulateIE7 strict-transport-security: max-age=31536000; includeSubDomains x-frontend-end: 2018-06-05T09:36:51.651 x-powered-by: ASP.NET x-feserver: VI1PR0101CA0061 x-msedge-ref: Ref A: 9251B1F610474C6F83A4DEFEA3C14797 Ref B: AMS04EDGE0917 Ref C: 2018-06-05T09:36:51Z date: Tue, 05 Jun 2018 09:36:51 GMT X-Firefox-Spdy: h2

HTTP/2.0 200 OK cache-control: no-cache, no-store pragma: no-cache content-length: 292 content-type: application/json; charset=utf-8 content-encoding: gzip expires: -1 vary: Accept-Encoding p3p: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI" set-cookie: OpenIdConnect.token.v1=AQAAAOADAADFvAnVWFaCHx5XIFrC14By45JdwIaJciEmq6QxjeEkDuu2FkvvzPTFQT48FfepaPUSJwOYaWPsN17BxG86W2EdRhra3LCEm0I7uqQ==; path=/; secure; HttpOnly X-OWA-CANARY=rLiI6SI6hEG8TKmFC33h0nDLEd7HytUY6h5Nd5-yklT1lwE6CMOtZ4E6DlBkS8aT6hvMlUUzYRM.; path=/; secure request-id: c1fcc6a9-e5f7-4376-8601-ed818121c114 x-calculatedbetarget: VI1PR01MB1245.eurprd01.prod.exchangelabs.com x-backendhttpstatus: 200 x-rum-validated: 1 x-content-type-options: nosniff x-ms-appid: 00000002-0000-0ff1-ce00-000000000000 x-owa-version: 15.20.820.15 x-owa-owsversion: V2018_01_18 x-owa-minimumsupportedowsversion: V2_6 x-owa-httphandler: true x-owa-diagnosticsinfo: 83;0;0 x-owa-correlationid: EEA57A52016E48BD82069FA4CF1379A5_152819141147695 x-owa-clientbegin: 2018-06-05T09:36:51.476 x-frontend-begin: 2018-06-05T09:36:51.464 x-backend-begin: 2018-06-05T09:36:51.564 x-backend-end: 2018-06-05T09:36:51.658 x-diaginfo: VI1PR01MB1245 x-beserver: VI1PR01MB1245 x-ua-compatible: IE=EmulateIE7 strict-transport-security: max-age=31536000; includeSubDomains x-frontend-end: 2018-06-05T09:36:51.651 x-powered-by: ASP.NET x-feserver: VI1PR0101CA0061 x-msedge-ref: Ref A: 9251B1F610474C6F83A4DEFEA3C14797 Ref B: AMS04EDGE0917 Ref C: 2018-06-05T09:36:51Z date: Tue, 05 Jun 2018 09:36:51 GMT X-Firefox-Spdy: h2

  • 不必混合和匹配EWS SOAP API和REST API请求并删除与SOAP XML相关的代码.

相关: REST API沙箱中的extendedProperties示例请求失败 )_/¯

Related: extendedProperties sample request in REST API sandbox fails ¯_(ツ)_/¯

推荐答案

我很好奇您使用EWS API看到的10-20%的故障率.您看到什么失败?

I am curious about the 10-20% failure rate you are seeing with the EWS API. What failures are you seeing?

关于设置标头,REST实际上是在幕后使用EWS业务逻辑,因此在EWS中工作的内容也应在REST中工作(有一些例外).例如,您应该可以通过REST扩展道具来遵循以下要求:

As for setting headers, REST actually uses the EWS business logic under the covers, so what worked in EWS should also work in REST (with some exceptions). For instance, you should be able to follow the below via REST extended props:

https://msdn. microsoft.com/en-us/library/office/dn596091(v=exchg.150).aspx

这篇关于在Outlook REST API中使用ExtendedProperties设置邮件项标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆