标签:head relative site lists doc get header https 成功
function createFolder()
{
var requestHeaders = {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"Content-Type": "application/json;odata=verbose"
};
$.ajax({
url: "https://winourway.sharepoint.cn/sites/test01/_api/lists/getByTitle(‘t2‘)/rootfolder/folders/add(url=\‘" + $("#childfolderName").val()+"\‘)",
method: "POST",
// body: "{ ‘__metadata‘: { ‘type‘: ‘SP.Folder‘ }, ‘ServerRelativeUrl‘: ‘Shared Documents/New Folder‘ }",
headers: requestHeaders,
success: function (data)
{
layer.msg("创建成功", {icon:1})
},
error: function (data)
{
console.log(data);
}
});
}
标签:head relative site lists doc get header https 成功
原文地址:http://www.cnblogs.com/only-levis/p/7060912.html