This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC3220SF-LAUNCHXL: Issue with the GET request in "SimpleLinkNetAppRequestEventHandler" handler

Part Number: CC3220SF-LAUNCHXL


Tool/software: Code Composer Studio

Hi,

I am using "SimpleLinkNetAppRequestEventHandler" handler to GET and POST data from the HTML page.

For the POST request I am getting correct value based on sent from the HTML page but when I do GET request on HTML onload(),I am not getting the value.

For POST I am using SL_NETAPP_REQUEST_HTTP_POST inside "SimpleLinkNetAppRequestEventHandler" handler.

For GET I am using SL_NETAPP_REQUEST_HTTP_GET inside "SimpleLinkNetAppRequestEventHandler" handler.

1. POST request :

case SL_NETAPP_REQUEST_HTTP_POST:

UART_PRINT("Received data is : %s\n\r",pNetAppRequest->requestData.pPayload); 
break;

I am getting data on Payload.

2. GET request : (Just to send "test" string)

                  case SL_NETAPP_REQUEST_HTTP_POST:

unsigned char *ptr;

                  pNetAppResponse->Status = SL_NETAPP_HTTP_RESPONSE_200_OK;
                  ptr = pNetAppResponse->ResponseData.pPayload;
                  pNetAppResponse->ResponseData.PayloadLen = 0;
                  memcpy(ptr, "test", strlen("test"));
                  ptr += strlen("test");
                 pNetAppResponse->ResponseData.PayloadLen += strlen("test");
                 *ptr = '\0';

Please suggest, how to implement GET response with in "SimpleLinkNetAppRequestEventHandler" handler.

Thanks and Regards,

Jasmin