strange results returning on HTTPSocket

Hi!

I have a cgi app running about 3 years the same way…

dim sock as new HTTPSocket dim temp, result As String temp = "https://msidatastore.ecshop.com.br/autentica.ecm?action=check_ajax_login&login_email=<myemail>&login_pass=<<mypassword>" result = sock.Post(temp,5)

and the result, could be “only”:

{“sucesso”:true,“status”:“200”,“mensagem”:“Usuario e senha validados com sucesso.”}
OR
{“sucesso”:false,“status”:“400”,“mensagem”:“Usuario ou senha invalidos para uma conta da eCShop.”}

Doing directly on browser, it’s working as expected.

But running from XOJO (debugging or compiled versions) it returns this:

??301 Moved Permanently????

301 Moved Permanently

??
nginx??????

Any ideas?

Same MacOS since last cgi working versions: 10.13.4
Same Xojo 2017r3

You may need to setup the User-Agent header.

That url is being redirected. Intercept the response headers to see where, or use Xojo.Net.HTTPSocket which takes care of it automatically for you.

how?

https://forum.xojo.com/27247-http-socket-request-header/0
https://forum.xojo.com/33567-help-with-a-httpsocket/0

This should be your answer. 302 indicates the resource (url) has been moved to another url