脚本内容:
","categoryIds": [],
"inSiteCandidate": false,
"inSiteHome": false,
"siteCategoryId": null,
"blogTeamIds": [],
"isPublished": true,
"displayOnHomePage": true,
"isAllowComments": true,
"includeInMainSyndication": true,
"isPinned": false,
"isOnlyForRegisterUser": false,
"isUpdateDateAdded": false,
"entryName": "test",
"description": "",
"tags": [
"test"
],
"password": null,
"datePublished": "2017-09-09T15:53:00.000Z",
"isMarkdown": false,
"isDraft": false,
"autoDesc": "test post blog",
"changePostType": false,
"blogId": 292825,
"author": "sixloop",
"removeScript": false,
"ip": null,
"changeCreatedTime": false,
"canChangeCreatedTime": true
};
var headers= {authority: "i.cnblogs.com", accept: "application/json, text/plain, /", x-blog-id: 292825}
$http.post('https://i.cnblogs.com/api/posts',postBody,
{withCredentials: true, headers: headers})
.then(function(data){
console.log(JSON.stringify(data, null, 2));
});