lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] httpd: how to implement AJAX


From: Giuseppe Modugno
Subject: [lwip-users] httpd: how to implement AJAX
Date: Mon, 13 Nov 2017 11:42:31 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

I'm trying to create a website with AJAX technology: the client polls, at regular intervals, the server with GET requests of file /status.json. The response is dynamic.

I could use only LWIP_HTTPD_CUSTOM_FILES and create the file at runtime in fs_open_custom(). It works, but I can't decode the query string, because it isn't passed to fs_open_custom() callback.

So I thought to use LWIP_HTTPD_CGI_SSI instead of LWIP_HTTPD_CUSTOM_FILES, but I have some difficulties to understand how it works. First of all, the file /status.json must be present in the filesystem (fs_open() must return ERR_OK), otherwise httpd_cgi_handler() isn't called at all.
However I can't return any data in httpd_cgi_handler().

Any help?




reply via email to

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