400 bad request the request cannot be fulfilled due to bad syntax postman tool error
-
08-02-2021 - |
문제
I am doing the POST operation from Postman tool to SharePoint online list but getting the 400 bad request the request cannot be fulfilled due to bad syntax error.
Here are my configuration in Postman tool:
URL:
https://globalsharepoint2019.sharepoint.com/sites/SharePointRND/_api/Web/Lists/GetByTitle('TestList')/Items
Raw Request Body:
Headers Parameters:
POST request status: 400 bad request the request cannot be fulfilled due to bad syntax
Anyone could help me - what is the bad syntax error here?
해결책
In order to include the "__metadata" object in your POST, you need to specify your content-type as "application/json;odata=verbose".
Alternatively, if you need to use the "application/json;odata=minimalmetadata" content-type, remove the whole "__metadata" json object, and instead specify the "ContentTypeId" in your body just like you are doing for your "Title", but you would need to first look up the ID of your TestListListItem
ContentType.