microsoftgraph / microsoftgraph/msgraph-sdk-python
How to add @microsoft.graph.conflictBehavior to a PUT request?
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 630
- 派生
- 96
- 平均合并
- 15 小时 20 分钟
- 30 天内合并 PR
- 3
描述
I have this piece of code:
await client.drives \
.by_drive_id(drive_id) \
.items \
.by_drive_item_id(f'root:/foo/baz/bar.txt:') \
.content \
.put(body)
I want it to fail if the file already exists.
According to this StackOverflow answer, I have to add @microsoft.graph.conflictBehavior with a value of fail somewhere. My question is: where? There's no additional_data key where I can pass this to, like it is shown in some other examples.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 issue 中显示的 fluent request 入口点开始,尤其是 drive item content PUT 调用,并跟踪请求选项是如何表示和发送的。完成的标准是请求能够表达所要求的 fail-on-conflict 行为,并且生成的 Graph API 请求使用预期的冲突设置。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100