ItemPreviewInfo 资源类型

ItemPreviewInfo 资源包含有关如何嵌入 DriveItem预览的信息。

JSON 表示形式

{
    "getUrl": "https://www.onedrive.com/embed?foo=bar&bar=baz",
    "postParameters": "param1=value&param2=another%20value",
    "postUrl": "https://www.onedrive.com/embed_by_post"
}

属性

名称 类型 说明
getUrl string 适合使用 HTTP GET (iframe 等嵌入的 URL )
postUrl string 适合使用 HTTP POST 和表单 (JS 等进行嵌入的 URL )
postParameters string 使用 postUrl 时要包含的 POST 参数

可能会返回 getUrl、postUrl 或两者,具体取决于指定选项的当前支持状态。

postParameters 是格式设置为 的字符串,如果对 postUrl 执行 application/x-www-form-urlencoded POST,应相应地设置内容类型。 例如:

POST https://www.onedrive.com/embed_by_post
Content-Type: application/x-www-form-urlencoded

param1=value&param2=another%20value