[Libwebsockets] Send http response after parsing request body
kzhdev at gmail.com
Wed Mar 13 21:28:22 CET 2019
I need to response a POST after parsing the request body. Can I call
lws_add_http_common_headers and lws_finalize_write_http_header in
LWS_CALLBACK_HTTP_BODY_COMPLETION? In this case, should I call
lws_callback_on_writable(wsi) in LWS_CALLBACK_HTTP or in
LWS_CALLBACK_HTTP_BODY_COMPLETION? In your minimal samples, you simply
redirect the request to another page. Could you add an example to show how
to properly send a dynamic response after parsing the request body?
in addition, when returning the http_callack function, what is the meaning
of return 0, 1, and -1?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets