javascript - Sharepoint Check In Rest API Error 'Not well formatted JSON stream' -


the same check in rest api working in sharepoint provider hosted low trust app in high trust app gives error 'not formatted json stream'

var spurl = appweburl + "/_api/sp.appcontextsite(@target)/web/getfilebyserverrelativeurl('" + fngetserverrelpath(sfileref) + "')/checkin(comment='check-in',checkintype=0)?@target='" + hostweburl + "'";

var executor = new sp.requestexecutor(appweburl);
executor.executeasync(
{
url: spurl,
method: "post",
headers: { "accept": "application/json; odata=verbose" },
binarystringresponsebody: false,
success: function (data) { },
error: function (data) { fnupdatefilefailure(data) },
state: "update"
});

i change header , works me !

headers: {
"x-http-method": "put",
"accept": "application/json; odata=verbose"
},


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -