Thanks, I manged to find that about half an hour after I posted my original question. --Zach
On Sun, May 24, 2009 at 1:20 AM, Merhawie <[email protected]> wrote: > > > http://groups.google.com/group/gears-users/browse_thread/thread/bd01eb51cf223271 > > On May 21, 4:07 am, Zachary Kessin <[email protected]> wrote: > > I am attempting to do a post request from the gears HTTPRequest class and > > the payload seems to not be sent. When I do a get it sends the data just > > fine but the POST dataseems to not send. At least the server never gets > it. > > Any ideas? Payload is a URL encoded string > > > > Here is some sample code... > > function ajax(url, payload, success, failure) > > { > > var request = google.gears.factory.create('beta.httprequest'); > > > > request.open('POST', url ); > > request.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); > > request.onreadystatechange = function readystatechange() > > { > > if (request.readyState == 4) > > { > > /*...*/ > > } > > }; > > request.send(payload); > > > > } > > > > --Zach >
