I have a share point list and when i try to create Item with Rest API call it throws 400 bad request error. here is my payload
{
"__metadata":{"type":"SP.Data.TestListItem"},
"FIRST_x0020_NAME":"YÄSIR ALI"
}
Request Headers
headers: {
Authorization: `Bearer ${accessToken}`,
'content-type': 'application/json;odata=verbose;charset=utf-8',
accept: 'application/json;odata=verbose',
Host: '****.sharepoint.com',
'Content-Length': body.length
}
i am using axios.post
I have tried changing content-type e.g (‘content-type’: ‘application/json;charset=utf-8’) event setting
accept: 'application/json;odata=verbose;charset=utf-8'
'content-transfer-encoding': 'binary',