gpt4 book ai didi

HTTP 请求头字段 "optdata"

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:27:25 30 4
gpt4 key购买 nike

所以,我在谷歌上搜索了很多,但找不到名为“optdata”的 HTTP 请求 header 字段。我正在努力让用户在 chromecast 设备上观看受 DRM 保护的视频。我正在关注 drmtoday.com 的一份文件,其中说:

For Widevine, the metadata must be carried inside the “optdata” field, inside the HTTP request header with name “dt-custom-data” or “x-dt-custom-data”.

我知道 header 键名称是“dt-custom-data”,但找不到任何引用资料来解释 optdata 到底是什么。

如果我只是将以下数据编码为 base64 并将其作为“dt-custom-data” header 传递,则请求失败并显示“HTTP Status 412 - Precondition failed”。

{ “用户编号”:“12345”, "sessionId":"RWFzdGVyZWdn", “商家”:“商家”

最佳答案

这只是意味着 dt-custom-datax-dt-custom-data header 支持键/值对。 optdata 是公认的 key 。

例如

dt-custom-data: optdata={ "userId":"12345", "sessionId":"RWFzdGVyZWdn", "merchant":"a-merchant" }

关于HTTP 请求头字段 "optdata",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35792897/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com