Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-21-2013, 08:21 AM   #1
LQ Newbie
Registered: Mar 2013
Posts: 3

Rep: Reputation: Disabled
Smile Microhttpd Library

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 ?

Thank you

Last edited by dan2012; 03-21-2013 at 08:23 AM.
Old 03-24-2013, 06:13 PM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905
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.
--- rod.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Compilation error - GSL library + MPI Benchmark Library = undefined reference quadpixels Programming 5 07-08-2012 03:33 AM
[SOLVED] ./configure problem for libsf library due to apparently missing libdb library. vectrum Linux - Software 6 08-05-2011 02:11 PM
ldd reports shared library missing, but library exists on disk athv_gr Linux - Newbie 7 05-13-2009 12:31 PM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM

All times are GMT -5. The time now is 06:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration