Here is how you can invoke AJAX POSTs in ExtJS that map to PUT and/or DELETE methods in your Jersey ReST services.
The first step is to configure Jersey to allow this:
<init-param>
<param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
<param-value>com.sun.jersey.api.container.filter.PostReplaceFilter</param-value>
</init-param>
The next step is to issue the AJAX request (in this case we're going to issue a POST but tell Jersey to invoke the PUT mapped method instead):
Ext.Ajax.request({
headers : {
'X-HTTP-Method-Override' : 'PUT'
},
method: 'POST',
url: '/my-api/some-service',
params: {
name : someObj.name,
date : someObj.date,
amount : someObj.amount
},
success: this.onSaveSuccess.createDelegate(this),
failure: this.onSaveFailure.createDelegate(this)
});