Adding header to Ajax request

Viewed 21639

How can I add a request header to an ExtJS ajax request?

I specifically want to add the header: accept-encoding to equal true.

4 Answers

With ExtJs 6. Ext.Ajax.defaultHeaders doesn't work. But using the following setter works

Ext.Ajax.setDefaultHeaders({
    'accept-encoding' : true
});
Related