NetBurner 3.5.0
PDF Version
 
HTML Form Post 2.X Compatible

The standard HTTP POST methodology in 3.x should be used whenever creating a new project. The 3.X methods enable cleaner code, less URL parsing, and better performance.

For customers migrating large and complex applications from legacy NNDK 2.X tools and platforms to NNDK 3.X, it is possible to create a HTTP POST callback function that in turn calls a MyDoPost() style 2.X function. This example assumes familiarity with the NNDK 3.X HTTP POST methods.

  • A NNDK 3.X HTTP POST callback function is declared with a wildcard mask ("*") so that it is called for all HTTP POST operations.
  • Strings are created for the URL containing the form action name and the posted form data
  • The 2.X style MyDoPost() function is called with the URL and data strings
  • The ExtractPostData() function is copied from the 2.X tools an included as a function in the application

Once the example has been loaded, interaction is through the device's web page. There are two web pages with forms for data entry, and a summary page at the end to display the assigned values from the post. Status messages are displayed on the serial port that can be viewed with a serial terminal, such as the MTTTY utility.

While every attempt has been made to ensure compatibility, every application must be tested to verify proper operation. Also, this example will not work with multi-part forms.