Heya,
Trying to post to an API that requires values to be Integers, can’t seem to concatenate strings and integers.
POST Request API:
:request body: val1 (int), val2 (int), val3 (int), val4 (int), val5 (optional int)
POST Request Application Firmware (C++)
//convert sensor int data to string
String valone(valoneint);
String valttwo(valtwoint);
String valthreeString(valthreeint);
String valfour(valfourint);
String valfiveString(valfiveint)
request.body = “{val1:”+valoneString+",val2:"+valtwoString+",val3:"+valthreeString+",valfour:"+valfourString+",valfive:"+valfiveString+"}";
The above code is the only way I can get it to compile but I can’t make a successful post to the API using this code since it expects integers, any help is appreciated.