How to handle delay in response from POST call in HTTP ?

Ritu21
Posts: 123
Joined: Sat Aug 04, 2018 9:58 am

How to handle delay in response from POST call in HTTP ?

Postby Ritu21 » 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.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: How to handle delay in response from POST call in HTTP ?

Postby fly135 » Mon Dec 10, 2018 9:39 pm

Wait for the HTTP_EVENT_ON_FINISH callback.

Who is online

Users browsing this forum: Bing [Bot] and 114 guests