I have a lot of PHP serverscripts that produce JSON from a DB to fill a store. These scripts looks for POST and GET parameters. If a POST parameter is available the script send normal JSON. If only GET parameter is received the script sends callback(.....) javascript. Because in ExtJS HttpProxy is default send with type: 'POST' and HttpScriptTagProxy requests are send with default type: 'GET'.

I expected Sencha-touch behave like ExtJS. No matter what I try to make request to get storedata Sencha-touch always send a GET request with URL-params. Another issue is that Sencha-touch expects a JSON message back and not a callback javascript.

As a workaround I sent an extra param mobile: true in requests. My PHP scripts now looks for this ??GET param mobile and act like a request width send with POST and send back a JSON message.

Is it possible to make requests that use type: POST???

14 Jan 2011, 8:24 AM

AndreaCammarata

Hi, sure you can make POST requests.
Try to write your request like this:

I know. I used that always in ExtJS. Works perfect. But if you try to define a proxy like following code, Sencha-touch ignores the parameter and always sends a GET Request with values added in the URL.