Guest User

Untitled

a guest
Jul 11th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. FreshBooks_HttpClient.prototype.sendRequest = function(content)
  2. {
  3. Mojo.Log.error("Sending Request");
  4. Mojo.Log.error("Content: %s", content);
  5. var post = "token=" + this.token + "&content=" + content;
  6. Mojo.Log.info("POST: %s", post);
  7. this.request.open("POST", this.url, false, this.token);
  8. this.request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  9. this.request.setRequestHeader("Content-length", post.length);
  10. this.request.send(post);
  11. if(this.request.status == 200)
  12. {
  13. Mojo.Log.error("Response: %j", this.request);
  14. return this.request.responseXML;
  15. }
  16. else
  17. {
  18. return false;
  19. }
  20. };
Add Comment
Please, Sign In to add comment