Skip to content

ItemItemsItemPermanentDeleteRequestBuilderInternal.Post missing content body/content-type headers #980

@michaeldcanady

Description

@michaeldcanady

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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions