Problem with GETS from ServerWarp

I have discovered a problem with a desktop app that worked fine when requesting JSON strings from my previous hosting company, but fails since I changed hosts to ServerWarp. Instead of receiving the expected JSON string, I get an error message saying the URL has moved permanently. In the URL that is returned all the ampersands [quote]&[/quote] used to separate the GET fields have been converted to [quote]&[/quote] If I copy the URL from the debugger and paste it into a browser, the expected JSON string is returned. I think it may be related to ServerWarp not running Apache as my previous host did.

I have been using the old framework HTTPSocket. My attempt to convert it to the new Xojo.Net.HTTPSocket failed when I could not figure out how to convert the content returned as a Xojo.Core.MemoryBlock to a string so I could process it.

By default we force SSL which uses an HTTP 30x status code to do the redirect. The classic HTTPSocket cannot follow this redirect. Two options: have us disable forced SSL or use Xojo.Net.HTTPsocket.

You want to convert the MemoryBlock to text. I’m not at my desk but it looks like:

Dim textContent as Text
textContent = Xojo.Core.TextEncoding.UTF8.ConvertDataToText(content)

It is not at all intuitive but hopefully API 2.0 cleans up and modernizes the HTTPSocket.

Thank you Phillip. I’ll figure out how to use the Xojo.Net.HTTPSocket.