Re: [lwip-users] REST API on microcontroller with lwIP

2021-02-01 Thread Adam Baron
Not sure, I thought you need to generate json/xml reply. On Mon, Feb 1, 2021, 6:27 PM Marco Giammarini wrote: > You mean genfiles_example > > /genfiles_example.c >

Re: [lwip-users] REST API on microcontroller with lwIP

2021-02-01 Thread goldsi...@gmx.de
Am 01.02.2021 um 18:14 schrieb Marco Giammarini: > You meanĀ genfiles_example > /genfiles_example.c >

Re: [lwip-users] REST API on microcontroller with lwIP

2021-02-01 Thread Marco Giammarini
You mean genfiles_example /genfiles_example.c ? But, how can I use this code with

Re: [lwip-users] REST API on microcontroller with lwIP

2021-02-01 Thread Adam Baron
Hello, there is example already provided on how to create a file at runtime. It works well, I have httpd basically generating all my html on the fly. On Mon, Feb 1, 2021, 5:49 PM Marco Giammarini wrote: > Dear all, > I am using lwIP over K64 (NXP microcontroller) and I would add REST API to > my

[lwip-users] REST API on microcontroller with lwIP

2021-02-01 Thread Marco Giammarini
Dear all, I am using lwIP over K64 (NXP microcontroller) and I would add REST API to my project. I try to understand how to do that, and the only way that I have found is to use CGI. The problem is the reply: I can reply only with a static file present in the SDCARD (the return of the callback f

Re: [lwip-users] REST API on microcontroller with lwIP

2021-02-01 Thread Trampas Stern
When a URL file request is made I check the file name. For example if the file name is stats.json then I know the client is requesting my status. So at that point I create the status json contents in RAM memory and then have the http server serve up that string. Care needs to be taken for examp

[lwip-users] REST API on microcontroller with lwIP

2021-02-01 Thread Marco Giammarini
Dear all, I am using lwIP over K64 (NXP microcontroller) and I would add REST API to my project. I try to understand how to do that, and the only way that I have found is to use CGI. The problem is the reply: I can reply only with a static file present in the SDCARD (the return of the callback f