Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FreshBooks_HttpClient.prototype.sendRequest = function(content)
- {
- Mojo.Log.error("Sending Request");
- Mojo.Log.error("Content: %s", content);
- var post = "token=" + this.token + "&content=" + content;
- Mojo.Log.info("POST: %s", post);
- this.request.open("POST", this.url, false, this.token);
- this.request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- this.request.setRequestHeader("Content-length", post.length);
- this.request.send(post);
- if(this.request.status == 200)
- {
- Mojo.Log.error("Response: %j", this.request);
- return this.request.responseXML;
- }
- else
- {
- return false;
- }
- };
Add Comment
Please, Sign In to add comment