REST API on K64 with lwIP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

REST API on K64 with lwIP

747 Views
MarcoGiammarini
Contributor III

Dear all,

I am using lwIP over K64 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 following function is the address of the file.

typedef const char *(*tCGIHandler)(int iIndex, int iNumParams, char *pcParam[],char *pcValue[]);

Does someone return a JSON build at runtime?

Does someone parse a GET REST request build with / and not with &? How? 

api/test/1/3 indeed of api/test.cgi?arg=1&subarg=3

Thanks

Marco

Tags (4)
0 Kudos
1 Reply

698 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Marco:

 

I would suggest you get help from lwip users forum for this question.

 

Regard

Daniel

0 Kudos