XMLHttpRequest / RequestBuilder - withCredentials

245 views
Skip to first unread message

davewilliamson

unread,
Aug 30, 2010, 12:14:05 PM8/30/10
to Google Web Toolkit
Hi,

Using GWT RequestBuilder, I need to set the "withCredentials" flag for
the XMLHttpRequest (I need to do XSS with access to Cookies as part of
an RPC call).

Maybe I am too much of a Noob with GWT, but can't see how this can be
done?!?!

Everything else I am try to do is working fine (i.e. I get the correct
data/functions that I am trying to achieve (Cross site)), but cannot
pass a cookie to the Server, or set a cookie from the Server - I am
using GAE to host the application.

I appreciate the default action of XMLHttpRequest is to set the
'withCredentials' flag to false (for XSS), hence the ability to
override this setting when sending the request - But RequestBuilder
doesn't appear to provide any interface to this function.

Can anybody point me to the way this would be set?

Regards

Dave

Thomas Broyer

unread,
Aug 30, 2010, 3:30:38 PM8/30/10
to Google Web Toolkit


On 30 août, 18:14, davewilliamson <dave.p.william...@googlemail.com>
wrote:
You can't do that with RequestBuilder, but you can use
com.google.gwt.xhr.client.XMLHttpRequest instead. It's a
JavaScriptObject (aka "overlay type") so you can use JSNI (or just a
cast to your own JSO) to set its withCredential property to true.

davewilliamson

unread,
Aug 31, 2010, 3:13:15 AM8/31/10
to Google Web Toolkit
Thanks Thomas,

I'll have a look at that!

Regards

Dave
Reply all
Reply to author
Forward
0 new messages