#include #include #include #include "trlitool.h" #include "proto/webapi.protoh" extern "C" void webmain() { //tlmpweb_title ("webapi"); bool endserver,endclient; if (1){ REQUEST_JSON_INFO req; const char *json = tlmpweb_getpost(); (NULL, req, json, strlen(json), endserver, endclient); rep_test (a+1); TESTOBJ res = a; res.a += " hello"; res.b += " the"; res.c += " world"; rep_testobj (res); vector ress; for (auto &o:a){ TESTOBJ res = o; res.a += " hello"; res.b += " the"; res.c += " world"; ress.push_back(res); } rep_testobjs (ress); unsigned char *buf = (unsigned char *)bob.getbuffer(); size_t size = bob.getsize(); unsigned nbvalid = 0; // testproto sends a sequence of bytes so buf[i] == i%256; for (unsigned i=0; i htmlprintf ("Invalid request
%s\n",tlmpweb_getpost());
}else{ htmlprintf ("Ok\r\n"); } }