Web browsers and forms: multi-part/form-data format
If the client is a web browser, then HTTP server scripts can interact with HTML forms and accept input from them in multi-part/form-data encoding format.
Example:
<html><head>
<title>test page for testing CL_Tcp server script
</title>
</head><body>
<p>CL_Tcp.pl</p>
<form action="/cgi-bin/CL_Tcp.pl" enctype="multipart/form-data"
method="POST">
<p>timeout: <input type="text" name="timeout"></p>
<p>data file: <input type="file" name="data"></p>
<input type="submit" value="Submit">
</form>
</body></html>
This example uses two input fields, timeout and data, for providing input arguments to the
CL_Tcp
script. The form uses the file input
type, where you can select to interface with your local file system.
The form also uses the multi-part/form-data encoding type, where the server script can accept multiple data inputs of almost any type. For example, although the data input may be binary, it can be safely passed along with the time-out input, which is text.