在内容可用之前发送的 `published` / `unpublished` webhooks

`published` / `unpublished` webhooks sent before content is available

所以我正在尝试使用 Kentico Cloud 构建内容管道。要求之一是按下大绿色 Publish 不是该过程的最后一步。然后必须收集已发布的内容,将其表示形式转换并转发到其他地方。订阅 publish / unpublish webhook 事件然后处理相关内容看起来是可行的方法,但显然这些有时会在内容通过交付可用之前触发 API.

我有哪些选择?我真的不想进行轮询 - 内容的嵌套结构加上无法按父项进行过滤,这让这变得非常重要。

事实证明,答案就在 API 文档中: https://developer.kenticocloud.com/reference#list-content-types

X-KC-Wait-For-Loading-New-Content

If the requested content has changed since the last request, the header determines whether to wait while fetching content. This can be useful when retrieving changed content in reaction to a webhook call. By default, when the header is not set, the API serves old content (if cached by the CDN) while it's fetching the new content to minimize wait time. To always fetch new content, set the header value to true.