CGI Demo - Seminole
Copyright © 2011 by Gladesoft. All Rights Reserved.
How CGI works in Seminole
In a traditional web-serving environment form data is sent through some form of IPC to an external process that returns the response.
Many embedded operating systems do not support the notion of a process. Even when the concept of a process does exist IPC is typically expensive. Seminole combats these problems by providing a direct API for processing form data.
There are three principle ways to transmit form data when using HTTP: as a query string in the request URL, using the POST method with a request body, or using POST with multipart data. The first method is suitable for small amounts of data but is very efficient. The second approach is suitable for larger amounts of data. The final method is used when the client sends large amounts of data, such as when uploading files.
Seminole supports all three methods. Below are some example forms that use each of the methods. When the form is submitted the fields are simply sent back using the built-in Seminole templating engine.
Form using GET
Form using POST
Form using POST (with multipart/form-data encoding)