I'm a newby in Ext JS and I need to make a restful call that returns a file to the browser. How should I do this?
This is what I have so far, the call is return but I can't get the file downloaded to the browser.

Ext.onReady(function () {

form = Ext.Ajax.request({
    url: 'http://localhost:8080/getfile',
    success: function(x){
                 return x; 
    failure: function () { console.log('failure');},
    params: {'someparams': Ext.encode ({'abc': {'hello': '123'}})
I could get it to work with a GET call using:

window.open('http://localhost:8080/getfile', 'Download')