The payload generated at https://github.com/rdkcentral/rdkfwupdater/blob/develop/src/device_status_helper.c#L824 does not care about the special characters being present. This may cause Server to interpret the data wrongly. In this case; the UTC time string retrieved will have SPACE characters in it which may cause issues.
Also the function size_t createJsonString(char *pPostFieldOut, size_t szPostFieldOut) does not create a JSON object which makes it quite confusing.
When using the curl library to send POST requests, it is generally recommended to URL-encode (also known as percent-encode) the POST parameters to ensure that the data is transmitted correctly and interpreted properly by the server. URL-encoding is necessary because certain characters have special meanings in URLs and HTTP requests, and encoding them ensures that they are treated as data rather than control characters.
The payload generated at https://github.com/rdkcentral/rdkfwupdater/blob/develop/src/device_status_helper.c#L824 does not care about the special characters being present. This may cause Server to interpret the data wrongly. In this case; the
UTC timestring retrieved will have SPACE characters in it which may cause issues.Also the function size_t createJsonString(char *pPostFieldOut, size_t szPostFieldOut) does not create a JSON object which makes it quite confusing.
When using the curl library to send POST requests, it is generally recommended to URL-encode (also known as percent-encode) the POST parameters to ensure that the data is transmitted correctly and interpreted properly by the server. URL-encoding is necessary because certain characters have special meanings in URLs and HTTP requests, and encoding them ensures that they are treated as data rather than control characters.