PDA

View Full Version : Changing the url for a Direct call



eVizions
25 Jun 2009, 9:38 AM
I am wondering if anyone has a way to use an alternate url for a single Ext.Direct call. I have a few calls in my app that need to be secure, so I need to swap out the url for an https url. I know I could just call a normal Ext.Ajax.request(), but I'd like to keep everything consistent. Any ideas?

elishnevsky
25 Jun 2009, 10:08 AM
I am wondering if anyone has a way to use an alternate url for a single Ext.Direct call. I have a few calls in my app that need to be secure, so I need to swap out the url for an https url. I know I could just call a normal Ext.Ajax.request(), but I'd like to keep everything consistent. Any ideas?

You can have two providers, one for normal calls and one for secure calls.

eVizions
25 Jun 2009, 10:34 AM
Hmmm, yeah, I tried that and came up with mixed results due to the fact that it's https. Is there a way to change the proxy for the new provider to a ScriptTagProxy? I can't see anything in the API regarding this.

eVizions
25 Jun 2009, 10:41 AM
On second thought, I can't use ScriptTagProxy if I am sending secure info since it doesn't accept post parameters. It appears this can't be done... or am I missing something? Is there a way other than creating an iframe and calling in a new https page to handle this?

tryanDLS
25 Jun 2009, 10:52 AM
How about http://extjs.com/deploy/ext-3.0-rc2/docs/?class=Ext.data.HttpProxy&member=setUrl

eVizions
25 Jun 2009, 11:04 AM
I was under the impression I couldn't do that because of the same origin policy.

tryanDLS
25 Jun 2009, 12:02 PM
Are you saying that going from http to https on the same domain is causing a Same Original policy violation?

eVizions
25 Jun 2009, 12:36 PM
Yeah, same domain. Same url, actually.