Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Wordpress(){
  2. this.submitPostJSON = function(postData){
  3. var altPost = postData;
  4. console.putmsg("\1rDebug : submitPostJSON func \1g data submitted to server stringified json \1h\1y\r\n " + JSON.stringify(altPost));
  5. var jsonEndpoint = this.requestURL.url + "/wp-json/posts/" + altPost["ID"];
  6. //var altPostData = altPost;                                                                                                                                                                                
  7.  this.request.SetupPost(jsonEndpoint,undefined,undefined,altPost);
  8. this.request.request_headers.push('Content-Type: application/json');
  9. this.request.SendRequest();
  10. // this.requestURL.request_headers;                                                                                                                                                                        
  11. //console.putmsg("request header \1h\r\n" + jsonRequestHeader);                                                                                                                                            
  12. var success2 = this.request.body;
  13. return success2;
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement