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:"SimpleLinkNetAppRequestEventHandler"处理程序中的 Get 请求出现问题

Guru**** 2589245 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/951851/ccs-cc3220sf-launchxl-issue-with-the-get-request-in-simplelinknetapprequesteventhandler-handler

器件型号:CC3220SF-LAUNCHXL

工具/软件:Code Composer Studio

您好!

我正在使用"SimpleLinkNetAppRequestEventHandler"处理程序从 HTML 页面获取和发布数据。

对于 POST 请求,我将根据从 HTML 页发送的值获得正确的值,但当我在 HTML onload()上收到请求时,我没有获得该值。

对于 POST、我使用 的是"SimpleLinkNetAppRequestEventHandler"处理程序内的 sl_NetApp_Request_HTTP_POST。

对于 Get、我在  "SimpleLinkNetAppRequestEventHandler"处理程序中使用 SL_NetApp_Request_HTTP_Get。

1.申请后:

案例 SL_NetApp_Request_HTTP_POST:

UART_PRINT ("接收到的数据是:%s\n\r\n、pNetAppRequest->requestData.pPayload);  
中断;

我正在获取有关有效载荷的数据。

2.获取请求:(仅用于发送“测试”字符串)

          案例 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';

请建议如何在"SimpleLinkNetAppRequestEventHandler"处理程序中实现 Get 响应。

谢谢、此致、

Jasmin

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

      现在使用"SimpleLinkHttpServerEventHandler"处理程序、我可以根据定义令牌获取事件、而不是"SimpleLinkNetAppEventHandler"处理程序。

    我猜"SimpleLinkNetAppRequestEventHandler"处理程序是与网络相关的事件。

    谢谢、此致、

    Jasmin

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Jasmin、

    您是否仍然需要任何帮助? 您似乎找到了一个解决方案。

    Jesu

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Jesu、

    是的、我找到了解决方案。

    谢谢、此致、

    Jasmin