On Thu, Feb 26, 2009 at 6:48 AM, Alexander Back <[email protected]>wrote:

> When sending a request using the POST method and the XmlHttp transport
> > implementation, setting the POST parameters via the request
> > setParameters() method will feed the POST data with the given
> > parameters, but it will also trigger the building of the query string in
> > the URL : in current release 0.8.1, in qx.io.remote.XmlHttp, line 206
>


> If you use the method "setParameters" the Request class will ALWAYS add
> the parameters to the URL. This behaviour is intented.
>

As Alex said, the purpose of setParameters() is to add them to the URL.
There have been a few attempts ("hacks" is probably a better term) in the
past few years, to allow various options for sending "parameters" in GET or
POST requests, in manners more appropriate to the specific request. An early
attempt at that was with the no-url-params-on-post property. A provision
added later, and probably a better option for your needs, is the
setFormFields() method which puts your "parameters" into the body of a POST
message, although it puts them in an embedded form IIRC. As long as that
embedded form is acceptable to you at the backend, it's probably the easiest
way to accomplish what you're looking for.


> That's the way to go for POST requests: you have to use the "setData"
> method in order to add the data to the request body.
>

As previously stated, you can use the setFormFields() method which
internally calls setData(). If setFormFields()'s embedded form won't work
for you, you can manually provide any data you like with setData().

Derrell
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to