[En-Nut-Discussion] Need Help with REQUEST structure - Query StringParsing.

Hugo Simon hugo.simon at gmx.de
Tue Jan 10 22:02:48 CET 2006


You can use the NutHttpGetParameterName function to request the parameters
one bye one like this:

 char *name,*value;
 int pcount;
 pcount = NutHttpGetParameterCount(req);
 if (pcount>0)
 {
   for (i=0; i<pcount; i++)
   {
     name = NutHttpGetParameterName(req, i);
     value = NutHttpGetParameterValue(req, i);
     printf("Parameter %i: %s=%s\n",i,name,value);
   }
 }

bye
Thorsten

> here is what is being sent to the ethernut board -
> /cgi-bin/config.cgi?S=1&N=1&R=1&A1=1&S1=1&A2=1&S2=1&A3=1
>
> When I attempt to read the query string from within my registered
> config.cgi function:
>         printf("\nQuery String =  %s\n",req->req_query);
>         The result is:  "S" only.  This gives me impression that the
> string is being terminated on the "=" sign.
>
> Sure could use some helping understanding my problem..





More information about the En-Nut-Discussion mailing list