libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] MHD_create_response_from_callback() not called on POST


From: Leonard Bocock
Subject: [libmicrohttpd] MHD_create_response_from_callback() not called on POST
Date: Tue, 27 Sep 2016 22:44:19 +1300

Hi

Building a basic lightweight server that handles Server Side Events (using HTTP 
GET is working) and JSON request/response using POST’d data request and 
formatting a JSON response.  

Provided the following is used (unsure why), JSON data appears in the response 
callback function parameters, along with data length. The request is small in 
length.

MHD_create_response_from_callback()    if (&aptr != *ptr) {
        *ptr = &aptr;
        return MHD_YES;
    }

However, I want to bypass MHD_create_post_processor () and simply respond back 
to the client using MHD_create_response_from_callback(). Except the callback 
handler is never called. It’s the same approach I’m using for the SSE GET, and 
that works fine.

Is this by design I assume? Is there away, when handling a POST response, to 
invoke the response handler callback? Or  is the only answer to mock up my own 
MHD_create_post_processor construct to process JSON data?

Thanks, Leonard.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]