Adding variables to EthernetClient println()


I'm creating al little script that will get some JSON data from an api, and because i'm a neat freak i would like to store all variables in a seperate config file for easy editing later.

But when I try to add a variable to the EthernetClient println() method like so:

client.println("GET " + uri + " HTTP/1.1");

i get the following error:

weathericon.ino: In function 'void setup()':
weathericon:40: error: invalid operands of types 'const char*' and 'const char [10]' to binary 'operator+'

Now i understand you can't use the "+" sign but what is the correct way of doing this?

Thanks in advance,


What data type is "uri" ?

char uri = '/api/weahther.php';

I use sprintf.

char tBuffer[65];
unsigned int testInt = 16;

sprintf(tBuffer,"GET /mypage.php?testVal=%u HTTP/1.1",testInt);