View Full Version : Http Proxy uses GET for load action

8 May 2009, 6:07 AM
I've found out that HttpProxy uses GET method for load action and for the other actions use POST, I've just post this thread to find out why? does GET has any kind of advantages?

19 May 2009, 10:34 AM
Ok I know this is a bit old and nobody has answered it bit it's still worth answering. This is my take on things and it doesn't reflect on the philosophy of the ExtJS team. Nor does it speak for them.

In the HTTP standards of GET and POST I believe this action is correct. When you're "loading" information you're only retrieving that information and no change is supposed to occur. The GET method is meant to be a safe operation to only retrieve data from the server. It isn't supposed to be used to change it. So when loading information HttpProxy uses the GET method initially. You can force it to use POST by setting the method configuration to POST.

The POST method should be used when you need to change something on the server. And that is why HttpProxy uses POST when params are present and you initiate the call, the proxy assumes you're making a call to make a change.

Not everyone sticks to this standard and not everyone agrees that GET is a safe method meant only to retrieve and POST is a method meant only for change. But that's what I pretty much stick to.