Hi,
I made a Xojo WebApp and want to show Pictures from my normal homepage.
Before I show the image, I want to test, if is available.
I thought I can use something like this:
dim imageIsThere as string
dim socketImage as new HTTPSocket
imageIsThere = socketImage.Get("http://www.myurl.com/photos/test.jpg", 20)
if socketImage.HTTPStatusCode = 200 then
ImageView_Article1.URL = "http://www.myurl.com/photos/test.jpg"
else
ImageView_Article1.URL = "http://www.myurl.com/photos/nopic.jpg"
end if
Pressing start in Xojo 2017.1 at macOS 10.12: everything is ok. The test.jpg is found, I got the status 200, and the picture is showing.
But when I copy it to my Windows 2012 as a compiled standalone app, the httpsocket doesn’t get the 200. I got a 0! The status 0 isn’t normal in http.
So what do I wrong?