microsoftgraph / microsoftgraph/msgraph-sdk-go
ItemItemsItemPermanentDeleteRequestBuilderInternal.Post missing content body/content-type headers
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 335
- Forks
- 43
- Avg merge
- 15h 19m
- Merged PRs (30d)
- 3
Description
Describe the bug
when you send a request using, ItemItemsItemPermanentDeleteRequestBuilderInternal.Post, it fails with error: Write requests (excluding DELETE) must contain the Content-Type header declaration.
if you include the header you get the following:
Empty Payload. JSON content expected.
Expected behavior
when ItemItemsItemPermanentDeleteRequestBuilderInternal.Post is called the item is deleted permanently.
How to reproduce
you can use the example from the docs:
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Drives().ByDriveId("drive-id").Items().ByDriveItemId("driveItem-id").PermanentDelete().Post(context.Background(), nil)
SDK Version
1.96.0
Latest version known to work for scenario above?
idk
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
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 with ItemItemsItemPermanentDeleteRequestBuilderInternal.Post and reproduce the failure using the documented DriveItem PermanentDelete call. Trace how the request handles its content body and Content-Type, then verify that the call completes without the header or empty-payload errors and permanently deletes the item.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100