Just a quick response, im in a hurry, so sorry if this is just pile of crap;
Runtime.js, around line 149 there's a workaround for cocoonjs:
if (method_ === "POST" && data_)
{
if (request["setRequestHeader"])
{
request["setRequestHeader"]("Content-Type", "application/x-www-form-urlencoded");
request["setRequestHeader"]("Content-Length", data_.length);
}
request.send(data_);
}
else
request.send();
Could you use this snippet, make a varible like this.myHeader which you can set, and then replace the "setRequestHeader" with this.myHeader (and other stuff you need), and in construct before making the ajax call set this.myHeader with an action, and then make the call.
"Need to have something working by end of day :(" -> Ahh, the good 'ole deadlines :D
Cheers!