2 Replies Latest reply on Dec 19, 2018 11:44 AM by ChMa_3922746

    CYW943907AEVAL1F Support for HTML Form Post


      I was looking through the forum for an example of how the CYW943907 eval board, when configured as an HTML server, could process fields from a form using "post".  I was able to follow the "application" example in the SDK which uses "get".  Any pointers on this one? Thanks!

        • 1. Re: CYW943907AEVAL1F Support for HTML Form Post

          I believe you meant the "appliance" application in demo directory of WICED for example of http server. There is no sample example for POST method, but you can build an application with post method considering the implementation of "demo.appliance". The ajax script(WICED-Studio-6.2\43xxx_Wi-Fi\resources\scripts\general_ajax_script.js) needs to be modified to send POST method, instead of GET. 

          • 2. Re: CYW943907AEVAL1F Support for HTML Form Post

            Yes, I was looking at the "appliance" application.


            Update: I was able to get a form POST to work by:

            1) Employing a simple HTML form in the webpage (action ="/button_handler" method ="post") (I didn't use javascript/ajax).

            2) The submitted text data length shows up in http_message_body->message_data_length, and the data is pointed to by http_message_body->data.  The data can then be parsed/processed as required.


            The same idea pertains to uploading a file, also.  I can upload a file and parse it as well.



            1 of 1 people found this helpful