HTTP GET response not recognized

I’m using the app that I created to get a response from a web server.
I’m using the web component .get blocks.

It works properly on the AI2 emulator and on any browser on Android or PC. It just doesn’t work with the app. The error that comes up on the app is Error 1101 Unable to get Response from specified URL.

A connection is established and the data is being sent to the server properly. The response that the server is sending just doesn’t get recognized by the app like it does on a browser or the AI2 Emulator.

Here is the response text:
“HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n\r\n\r\nTest1 is good\r\n\r\n”

I tried it on a couple of phones with the same results.

I saw that others have had this same issue with no resolution. I have also have seen where others have used the same code as I’m using, and it works properly.

Is there a setting on my phones or in AI2 that might be causing this issue?

some of the tutorials I’m referencing are a couple years old. Is this possibly an AI2 update issue?

Any help would be greatly appreciated.

What is the URL you are trying to Get?

This and others like it. http://192.168.0.45/Test1

Your IP target is a local IP address on your home network.
Is your phone set to connect through local WiFi, or is it set to connect through your paid wireless carrier?

M phone is connected thru local wifi. Like I said previously, the Get request is being received by the web server. The phone doesn’t like the response for some reason.

I can’t understand why it would work normally with the emulator on PC and any browser on either PC or phone. They both display the response content.

I tried on an old phone S4 mini and a newer A10e with the same results.

I Figured out the issue. The Code in the Web server was disconnecting from the client right after sending the response. I removed that function and the issue went away.

Thanks

Thanks for telling us the solution!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.