TXDataWebConnection.URL must be either HTTP:// or HTTPS:// is that correct. I've been running round trying to work out why my connection was failing. It was connecting at design time, but not at runtime.
At designtime, it didn't need the http, but at runtime you got an error.
Either be consistent at designtime and runtime or have the property raise a warning.
TXDataWebConnection.Url should contain the URL address of your XData server. Since it's HTTP protocol, you must specify if you're using http:// or https:// - they are considered different "addresses", as with any HTTP communication, not only with XData.
There should be no difference between design-time or runtime, besides the obvious ones: at design-time you are connecting from Delphi, at runtime you are connecting from the browser. Please indicate the error message, maybe something browser-related is preventing you from connecting to the address but you can connect from Delphi.
But of course, at runtime the javascript in browser doesn't like it. So I am saying, either at designtime it should fail (or warn). For a newbie I couldn't see why it wasn't working at runtime.
I understand what you mean now. But I'm not sure how to solve it or help the user in this case.
Point is your URL is valid at design-time, but at runtime it's considered a relative path (relative to your web app address). I think it's a valid address and some users might want to use it, the relative address.
But it's also a valid address at design-time, and at design-time there is no way to know what would be the base URL address of web app.
So I guess I didn't realise that you use the same components for VCL connection or a WEB Core connection. That makes sense.
The component does know what kind of app it is being dropped onto though, e.g. if I drop a JQuery component on a VCL form it gives me a warning. So presumably the setter could do the check. But in the grand scale of things, it's minor, but just a stumbling block for the newbie.
It's not the same component. TXDataWebConnection is target for Web Core applications only. It's just that the IDE runs Win32 code at design-time. Every component in Delphi, even if works for, say, Android, will have its "win32 version" running at design-time.