libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Any MHD_ContentReaderCallback Example Code


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Any MHD_ContentReaderCallback Example Code
Date: Mon, 5 Feb 2018 14:58:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/04/2018 03:19 AM, lingweicai wrote:
> Dear all:
> 
> I want to create responses with strings variables, for example , html
> start tag, html title, css, js, head1, content, html end tag , etc.
> 
> Can I use this callback function instead of
> MHD_create_response_from_buffer?

In principle you can use MHD_create_response_from_callback() always
instead of _from_buffer, as _from_callback is more general. Whether it
makes sense in your case I cannot judge.

> I have not found any example codes on the callback.

Look here: src/examples/fileserver_example_dirs.c

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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