to me it seems to be in your variable definitions:
String ServerToConnectTo;
String PageToGet;
ServerToConnectTo = URLtoGet.substring(0, URLtoGet.indexOf("/"));
PageToGet = URLtoGet.substring(URLtoGet.indexOf("/"));
.
.
if (client.connect(ServerToConnectTo , 80))
"client.connect()" needs a "const char* ServerToConnectTo" definition for the host
in the .h there is no definition matching ".connect(string, int)" only ".connect(const char*, int)"
virtual int connect(IPAddress ip, uint16_t port);
virtual int connect(const char *host, uint16_t port);