ItemPreviewInfo 资源类型

命名空间:microsoft.graph

重要

Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。

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"
}

属性

属性 类型 Description
getUrl string 适用于使用 HTTP GET (iframe 等嵌入的 URL,)
postUrl string 适用于使用 HTTP POST (表单文章、JS 等嵌入的 URL )
postParameters string 使用 postUrl 时要包含的 POST 参数

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

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

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

param1=value&param2=another%20value

URL 和参数的格式应被视为不透明。