Closed eabase closed 5 years ago
In: https://github.com/stanleyhuangyc/Freematics/blob/master/firmware_v5/sim5360test/sim5360test.ino
unsigned int genHttpHeader(HTTP_METHOD method, const char* path, bool keepAlive, const char* payload, int payloadSize) { // generate HTTP header char *p = buffer; p += sprintf(p, "%s %s HTTP/1.1\r\nUser-Agent: ONE\r\nHost: %s\r\nConnection: %s\r\n", method == HTTP_GET ? "GET" : "POST", path, HTTP_SERVER_URL, keepAlive ? "keep-alive" : "close"); if (method == HTTP_POST) { p += sprintf(p, "Content-length: %u\r\n", payloadSize); } p += sprintf(p, "\r\n\r"); return (unsigned int)(p - buffer); }
Why are you including payload, when it is not used? Was there another intention for this?
There is no point. Payload is actually sent in httpSend().
In: https://github.com/stanleyhuangyc/Freematics/blob/master/firmware_v5/sim5360test/sim5360test.ino
Why are you including payload, when it is not used? Was there another intention for this?