Hello,
I'm also trying to send parameters with POST method. I read this topic and saw that you are talking about
When the frame is received, the application call-back (fnHandleWeb() in webInterface.c) will receive the event type POSTING_DATA_TO_APP with a pointer to the received content *ptrData. The length is HTTP_session->FileLength.
What I have in my webInterface.c is:
...
switch (ucType) {
#ifdef SUPPORT_HTTP_POST
#ifndef _HW_NE64
#if FILE_SYSTEM_SIZE >= (160*1024) // support posting new firmware only with large file system
case CAN_POST_BEGIN:
//return (1); // block upload!!
return (0); // allow post at all times
case INFORM_POST_FAILED:
http_session->ptrFileStart = (unsigned char*)cWarningHTML;
http_session->FileLength = sizeof(cWarningHTML)-1;
#ifdef SUPPORT_MIME_IDENTIFIER
http_session->ucMimeType = MIME_HTML; // force HTML type
#endif
return DISPLAY_INTERNAL;
#endif
case INFORM_POST_SUCCESS:
#ifdef SUPPORT_MIME_IDENTIFIER
http_session->ucMimeType = MIME_HTML; // force HTML type
#endif
if (http_session->cDisplayFile == 'S') { // software upload
http_session->ptrFileStart = (unsigned char*)cSuccessSW_HTML;
http_session->FileLength = sizeof(cSuccessSW_HTML)-1;
uTaskerMonoTimer( TASK_APPLICATION, (DELAY_LIMIT)(1*SEC), 0 ); // wait 1 second to load the page
fnDelayResetBoard(); // after 2 seconds the application will reset and then the new software will be copied
}
return DISPLAY_INTERNAL;
#endif
#endif
...
So how can I handle incoming parameters from POST method?
Should I add
case POSTING_DATA_TO_APP by myself? I see that in
http.c I have a row:
fnHandleWeb(POSTING_DATA_TO_APP, (CHAR *)ucIp_Data, http_session);So I guess it passes the event correctly but there is no place where fnHandleweb() handles it.
Best Regards
Stan