GET request in Setup vs Loop

I'm using the GSM shield to establish an internet connection and then using GET request to grab data from a server.

When the GET code is in the "void Setup()" area then it returns data and client.available() is true. But.. when I move the code into a subroutine that's called from the "void Loop()" part of the code it seems as though no data is returned because client.available() is false.

Does anyone know why this might be?

I've used Serial.println in the subroutine to print the path and server so the GET request has all the details it needs and the client.available() is in the same subroutine. I just seems like nothing is returned when the GET isn't in the setup.

Any help would be greatly appreciated!

Does anyone know why this might be?

Yes. There is something wrong with your code.

:) Thanks.

RobpSF: :) Thanks.

You're welcome.

If you need help determining what the problem is, feel free to post your code.