Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Wordpress(){
- this.submitPostJSON = function(postData){
- var altPost = postData;
- console.putmsg("\1rDebug : submitPostJSON func \1g data submitted to server stringified json \1h\1y\r\n " + JSON.stringify(altPost));
- var jsonEndpoint = this.requestURL.url + "/wp-json/posts/" + altPost["ID"];
- //var altPostData = altPost;
- this.request.SetupPost(jsonEndpoint,undefined,undefined,altPost);
- this.request.request_headers.push('Content-Type: application/json');
- this.request.SendRequest();
- // this.requestURL.request_headers;
- //console.putmsg("request header \1h\r\n" + jsonRequestHeader);
- var success2 = this.request.body;
- return success2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement