-
27 Mar 2012 2:57 PM #1
Custom headers not working. Ext.Ajax.request()
Custom headers not working. Ext.Ajax.request()
REQUIRED INFORMATION
Ext version tested:- Sencha Touch 2.0.0
- Chrome 10.0.963
- html
- I use Ext.Ajax.request to make a content request, in wich one i want to customize sent headers, so i use "headers" config to send my own info, but the request sent to the server has no trace about this custom headers.
- Create new function and make a new ajax request, configure headers: { 'X-INFO':'info' }, no matter what uri.
- Control this function with some listener (button tap)
- Build&launch in browser, open Webkit Inspector (or similar) and analyze network, then call the control listener (tap the button or whatelse), and grab the adequate request, then take care on request headers.
- Was expected to found "X-INFO: info" inside the plain request petition.
- Just normal request headers, no custom info was found.
Ext.Ajax.request({
url: 'http://mywebservice/api/',
headers: { 'x-wsse' : this.getWsseHeader() },
success : function(response){
console.log(response);
}
})
Operating System:- OSX
25i6gyr.jpgLast edited by zeopix; 27 Mar 2012 at 3:03 PM. Reason: typo
-
27 Mar 2012 3:29 PM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
I do see the x-wsse in Chrome under Access-Control-Request-Headers using your example. Do you have any other details that may help reproduce the issue?
-
27 Mar 2012 3:47 PM #3
I have been following the trace of the headers object, i reached setupHeaders() method in Ext.data.Connection class, then i printed out headers value in console, x-wsse value was there, but then when i see request headers in Chrome it doesn't appears, i don't know what's happening, I will keep trying...
Thanks.
-
27 Mar 2012 4:03 PM #4
Solved, i can see the headers now, the mistake was on because of bad modifications that i've made to ext.data.connection source.
Thanks
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote