Arduino Ethernet Shield 2 Web-client to control Relay. DigitalWrite Breaks code

In your code

IPAddress   v_WebService;
...
... 
client.println("Host: " + v_WebService);

There are 2 problems :

  • You can't concatenate char* with + ("Host : " is char* and not string object)
  • v_WebService is not a string but an IPAddress object
    The line is not printed to the modem and you receive a 400 error (bad request)
IPAddress   v_WebService;
...
... 
client.print("Host: ");
client.println(String(v_WebService[0]) + '.' + String(v_WebService[1]) + '.' + String(v_WebService[2]) + '.' + String(v_WebService[3]));

Host is generaly a hostname and not an IP address if your HTTP server serves multiple hosts.