I am trying to create a folder in a document library with a custom content type. The custom content type is based on default document set content type.
The code below is straight forward in creating a folder, but I can't seem to find a way to assign the content type to that folder. Any help is much appreciated.
var pCreate = jQuery.ajax({
"url" : _spPageContextInfo.siteAbsoluteUrl + "/_api/Web/Folders/add('SiteCollectionDocuments/newfolder')",
"type" : "POST",
"headers" : {
"accept" : "application/json; odata=verbose",
"content-type" : "application/json; odata=verbose",
"X-RequestDigest" : $("#__REQUESTDIGEST").val()
}
});
jQuery.when(pCreate).always(function (data){
console.log(data);
});
Slugin headers. Try using solution given here and here