Skip to content

Bug in Update list item example #7955

@wilsoncpw

Description

@wilsoncpw

There's a bug in the 'Update List Item' example.

The line:
Content-Type: "application/json"
should be:
Content-Type: "application/json;odata=verbose"

Otherwise the __metadata in the request body doesn't get sent correctly, and the API returns a '400' error response.

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:docsCategory: SharePoint developer/development documentation relatedarea:docs-commentCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/devtype:archive-old-issueIssues which are closed as tool old for active work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions