Using HTML Socket with web app

I am trying to create a validation scheme for a desktop app that would use an HTMLSocket to send a license number to a web app that would work similar to the way Xojo validates licenses. Once I decode the returned content, I see that it is the unsupported browser message. I have tried to override the message by changing the ErrorMessage property and returning True in the session.AllowUnsupportedBrowser event, but still get the same message. If I type the message the HTMLSocket sends into Firefox, the web app returns what I expect. The docs suggest it is possible to suppress the unsupported browser message, but I can’t make it do it.

Is there a way to make a web app act like PHP and just return JSON values without all the html?

Use HandleURL or HandleSpecialURL

[quote=158094:@Dean Davidge]I am trying to create a validation scheme for a desktop app that would use an HTMLSocket to send a license number to a web app that would work similar to the way Xojo validates licenses. Once I decode the returned content, I see that it is the unsupported browser message. I have tried to override the message by changing the ErrorMessage property and returning True in the session.AllowUnsupportedBrowser event, but still get the same message. If I type the message the HTMLSocket sends into Firefox, the web app returns what I expect. The docs suggest it is possible to suppress the unsupported browser message, but I can’t make it do it.

Is there a way to make a web app act like PHP and just return JSON values without all the html?[/quote]

You mean HTTPSocket, don’t you ?

Actually, I was trying to use HTMLSocket and was trying to get the value I needed from the content returned. It looks like the HandleSpecialURL is intended to work with an HTTPSocket so I will be completely redoing the whole routine. Thanks Greg.

What is an HTMLSocket? Do you mean HTMLViewer?

Apparently, he is intent on his HTMLSocket that does not exist…

OOPS. You’re right. The dyslexia bug sometimes mixes things up for me.

Sorry about that. The problem is that the HTTPSocket has no concept of javascript, so there’s literally nothing to retrieve by just connecting to the app. By contrast, using HandleSpecialUrl, you can return a simple xml or JSON string of just your results and you won’t need to do any special parsing.