Req: asyncPostImpl() let us specify 'application/x-www-form-urlencoded'

0 views
Skip to first unread message

Mr. Monster

unread,
May 30, 2006, 7:27:45 PM5/30/06
to Google Web Toolkit
asyncPostImpl() is pretty annoying since its hard coded as:

xmlHttp.setRequestHeader("Content-Type", "text/plain; charset=utf-8");

I want to send simple POST data with form style encoding:

"var1=hello&var2=world"

I believe there should be a way to specify:

xmlHttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");


If it's already possible to do this please show me how, I don't see it
in the docs.

Mr. Monster

unread,
May 31, 2006, 10:02:05 AM5/31/06
to Google Web Toolkit
Bump, can any of the developers let us know if there are any plans for
this?

I don't want to be sending big ammounts of data using GET and have all
that stuff end up in httpd logs.

Mr. Monster

unread,
Jun 1, 2006, 9:44:40 AM6/1/06
to Google Web Toolkit
Bump

Scott Blum

unread,
Jun 2, 2006, 10:13:44 AM6/2/06
to Google Web Toolkit
Hi Mr. Monster,

I forwarded this to our XMLHttp guy. His responses tend to be
asynchronous, so in the meantime you could edit the source to provide a
way to get the encoding you need.

Scott

Joel Webber

unread,
Jun 2, 2006, 11:11:28 AM6/2/06
to Google-We...@googlegroups.com
I completely agree that this is a good idea.  It won't need to be a big change, just a couple of extra overloads in HttpRequest.  I'll add it to the issues list, as I'm certain other people will need this functionality from time to time as well.

joel.

Mr. Monster

unread,
Jun 2, 2006, 12:04:37 PM6/2/06
to Google Web Toolkit
Nice!

Reply all
Reply to author
Forward
0 new messages