View Full Version : how can I set custom HTML headers in scripttagproxy?

20 Jun 2011, 10:33 PM
I'm using JsonStore with scripttagproxy to load JSON data into list form.

Today, server API is changed & I must add some custom header field.

But I can't find the right way to do it with scripttagproxy!

I've tried

Ext.Ajax.defaultHeaders = {'blah':'blah'};

before loading my JsonStore, but it didn't work. :(

5 Oct 2011, 6:40 PM
Any luck so far?

6 Oct 2011, 8:10 AM
The script tag proxy is dropping a script tag in your document (with the src attribute equal to the script tag proxy url) with the the response script being a call to your callback function with the json results as the function parameter.

... snippet from doRequest

var script = document.createElement("script"); script.setAttribute("src", url);
script.setAttribute("async", true);
script.setAttribute("type", "text/javascript");
script.setAttribute("id", scriptId);

I dont believe you can do it. Is it possible for you to pass get params?