Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread RO SDK, json, same-origin-policy and ewb ?
Mon, Jan 20 2014 6:09 AMPermanent Link

PhillipH

My simple EWB project is at ... o-lynxlive.com
Just used www.o-lynxlive.com to go to it and I noticed no data is available while o-lynxlive.com is fine.
Checked domain and web server settings and everything was setup OK.
I presume its to do with ...
http://stackoverflow.com/questions/11395814/why-url-with-www-and-without-www-behaves-differently-for-json-request

and this line of my code ...
 FChannel := SDK.HTTPClientChannel.Create('http://o-lynxlive.com:8122/json');  

Has anybody dealt with this that could offer some pointers  ?
Mon, Jan 20 2014 6:19 AMPermanent Link

Matthew Jones

Both are working for me. What's the problem you are seeing?

>   FChannel :=
> SDK.HTTPClientChannel.Create('http://o-lynxlive.com:8122/json');  

FWIW, I use:

m_szHostAddress := window.location.host;
szServer := window.location.protocol + '//' + m_szHostAddress + '/JSON';
FChannel := RemObjects.SDK.HTTPClientChannel.Create(szServer);

This is because I sometime change the host for debugging, perhaps to change the
port or something. But it shows you can connect to the server you are downloaded
from.

I don't think that the RemObjects stuff is affected by the browser cross scripting,
unless you are using the http stuff directly.

/Matthew Jones/
Mon, Jan 20 2014 3:40 PMPermanent Link

PhillipH

Thanks Matthew. Your suggestion seems to have helped.
Image