Here is the function that I use with good results:
void sendGetRequest(const char * server, const char * url)
{
if (myTCP.connect(server, 80)) {
//Serial1.print("Connected to Server");
myTCP.print("GET ");
myTCP.print(url);
myTCP.println(" HTTP/1.0");
myTCP.println("Connection: close");
myTCP.print("Host: ");
myTCP.println(server);
myTCP.println("Accept: text/html, text/plain");
myTCP.println();
myTCP.flush();
}
}
I think the key part is the Host: part.