microsoftgraph / microsoftgraph/msgraph-sdk-python
How to add @microsoft.graph.conflictBehavior to a PUT request?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 630
- Forks
- 96
- Avg merge
- 15h 20m
- Merged PRs (30d)
- 3
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the fluent request entry point shown in the issue, especially the drive item content PUT call, and trace how request options are represented and sent. Done means the request can express the requested fail-on-conflict behavior and the resulting Graph API request uses the expected conflict setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100