I'm am having some basic C trouble, along with some other more advanced stuff.
I can POST to my own API, but I am having trouble adding a concatenated variable (basic C stuff...still learning), as well as with parsing a JSON returned array (200 status returned along with some other info).
I use a modified WebClient Sketch, which doesn't compile...I've tried every combination my young C mind can think of. For example:
char mqttCode[11]; //then I run some stuff and get an RFID badge in form of a string
strcpy(one, "POST /APICode/Sensor HTTP/1.1\r\nUser-Agent: uIP/1.0\r\nHost: myurl.com\r\nContent-Length: 25\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\nFacebookBadge=");
char posting;
posting = strcat(one, mqttCode);
const prog_char twitter[] PROGMEM = {posting};
void loop()
{
//if something happens, i post again
const prog_char twitter[] PROGMEM = {posting};
WiFi.run();
}
I'm also unsure about what function to use to get returned JSON information (which I imagine will come back with headers included, and I have no idea where to look for parsing information). Help!