Keep-alive in connection to POST again

If you are asking a question, please follow this template:

  1. My goal is: [Keep the HTTP connection alive and POST data again on each MG_EV_HTTP_REPLY]
  2. My actions are:
    [
    libs_version: 2.18.0
    https://github.com/mongoose-os-libs/ca-bundle

Using the function to POST data
httpConn = mg_connect_http(mgos_get_mgr(), MG_CB(HttpEvent_cb, “POST event”), url, header, post);
]
3. The result I see is: [It is working fine for POST one buffer]
4. My expectation & question is: [What is the API sequence can be used (any example) which can POST data again ??]

Don’t close the connection when processing MG_EV_HTTP_REPLY and use mg_printf or mg_send when you want to send another POST request.

I tried using the mg_send to send the 2nd packet of data.

But the server (using a simple Python BaseHTTPRequestHandler) complain following :

code 400, message Bad request version (’[]}\x00’)

What I have missing when sending with mg_send() for http protocol ??