microsoftgraph / microsoftgraph/msgraph-sdk-go

ItemItemsItemPermanentDeleteRequestBuilderInternal.Post missing content body/content-type headers

Open
#980 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:waiting-for-triage type:bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.