[Yanel-dev] Content type of Asynchronous AJAX request

Evaldas Taroza etaroza at optaros.com
Mon Feb 25 22:34:16 CET 2008


Michael Wechner wrote:
> Hi
> 
> I am not sure if I understand the following method
> 
>    /**
>     * If no request headers have been set, the header "Content-Type" 
> will be used with a value of "text/plain; charset=utf-8"
>     */
>    protected void initializeHeaders(){
>        requestBuilder.setHeader("Content-Type", 
> "application/x-www-form-urlencoded");
>    }

Looks like the javadoc is contradictory to the code:) What I wanted to 
do with this method was to simulate a form submition, because 
application/x-www-form-urlencoded is the default content type of XHTML 
forms.

But now, as you asked, I am not sure anymore if it makes sense.

Evaldas

> 
> which is used within
> 
> src/core/java/org/wyona/yanel/gwt/client/AsynchronousAgent.java
> 
> whereas I don't understand why the content type is set to 
> application/x-www-form-urlencoded.
> 
> Any idea why this content type?
> 
> Thanks
> 
> Michi
> 


-- 
+41 79 616 53 76
www.linkedin.com/in/taroza

Optaros - www.optaros.com


More information about the Yanel-development mailing list