I have tested the code attached by DiegoV_intel on my Galileo and it works great.
I added the check:
if(client.available()) {...}
inside the for loop when reading the answer before each char read,
to avoid the operation of reading when there is nothing to read.
Thanks DiegoV_intel.
Clik here to view.
