I want to use microhttpd for creating an embedded server. The goal is to send a request (ex : http://localhost/API/DoAction) and the server responds by executing the action, where "DoAction" executes a c++ method that has a functionnality.
How can i do that ?
You really always have to do that. The request from the HTTP client includes a URL that may or may not have a list of options/arguments. The callback for your HTTP server will get a copy of the URL as a pointer to a string. Your code will have to parse that string and then vector according to its makeup. The code that you choose to execute is arbitrary, and will reflect the nature of the application you are trying to create.
There are numerous examples in the library source tree to get you started.
|All times are GMT -5. The time now is 01:28 PM.|