Somewhere you've lost a line...I highlighted it red.
The line you want to add is shown in green.
Code:
if(strcmp(buffer,"POST ") == 0)
{
client.find("\n\r");
while(client.findUntil("PinD", "\n\r"))
{
int pin = client.parseInt();
int val = client.parseInt();
pinMode(pin, OUTPUT);
digitalWrite(pin, val);
Serial.println("I saw the POST and toggled the pin!")
}
}
Also I noticed you statically assigned the pin I think it best you start with the original unmodified code for this.
Just add the one green line to the original code.
Be back in 2 or so hours....gotta go to a MORT thing.....