How to handle delay in response from POST call in HTTP ?
Posted: Mon Dec 10, 2018 8:00 am
Hi Team,
I am posting an UART data to http server & getting a response from the server, which I want to parse.
To achieve this, I have made a task which receives data on UART. Upon receiving the data on UART, I call http_post function (event-driven), which posts the data to server. To parse the data, I have written a function using cJSON parser api, which is called when there is an event on http.
Problem I am facing here is: response from http post comes in two parts which makes the json data corrupted and hence not parsing it.
How to handle such situation where response comes with a delay??
Thanks
R.
I am posting an UART data to http server & getting a response from the server, which I want to parse.
To achieve this, I have made a task which receives data on UART. Upon receiving the data on UART, I call http_post function (event-driven), which posts the data to server. To parse the data, I have written a function using cJSON parser api, which is called when there is an event on http.
Problem I am facing here is: response from http post comes in two parts which makes the json data corrupted and hence not parsing it.
How to handle such situation where response comes with a delay??
Thanks
R.