rust-web-server 16.1.0

Collection of utility functions used to build Rust Web and TLS Server. Can be useful while developing HTTP related functionality
Documentation
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Form</title>
    <link rel="stylesheet" href="/static/style.css">
    <style>
        label {
            display: block;
        }

        label, button, h4, p {
            margin: 2em 2em 0 2em;
        }
    </style>
</head>
<body>
    <p><a href="/"><< Back to main</a></p>
    <p>There's a good article on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form">form</a> functionality in HTML.</p>
    <p>Below are listed several demos on howto handle forms within the framework while <a href="https://github.com/bohdaq/rust-web-server/blob/main/src/app/mod.rs">writing your apps</a>.</p>
    <p>You can use these  examples for your own implementations.</p>
    <h4>Form Method Post Url Encoded Enctype</h4>
    <p><a href="https://github.com/bohdaq/rust-web-server/blob/main/src/app/controller/form/url_encoded_enctype_post_method/mod.rs">FormUrlEncodedEnctypePostMethodController</a> controller capable of handling form with method <i>POST</i> and enctype <i>application/x-www-form-urlencoded</i> submission.</p>
    <form method="post" action="/form-url-encoded-enctype-post-method" enctype="application/x-www-form-urlencoded">
        <label>Field 1:
            <input name="field-1" />
        </label>

        <label>Field 2:
            <input name="field-2" />
        </label>

        <button>Save</button>
    </form>

    <h4>Form Method Get</h4>
    <p><a href="https://github.com/bohdaq/rust-web-server/blob/main/src/app/controller/form/get_method/mod.rs">FormGetMethodController</a> controller capable of handling form with method <i>GET</i> and without enctype specified. Most reliable method for submitting the form, works among all popular browsers.</p>

    <form method="get" action="/form-get-method">
        <label>Field 1:
            <input name="field-1" />
        </label>

        <label>Field 2:
            <input name="field-2" />
        </label>

        <button>Save</button>
    </form>


    <h4>Form Method Post Multipart Enctype</h4>
    <p><a href="https://github.com/bohdaq/rust-web-server/blob/main/src/app/controller/form/multipart_enctype_post_method/mod.rs">FormMultipartEnctypePostMethodController</a> controller capable of handling form with method <i>POST</i> and <i>multipart/form-data</i> enctype.</p>

    <p> Note: Even though such kind of form by spec supports file upload, in practice it won't work, however, server by itself, <a href="https://github.com/bohdaq/rust-web-server/blob/main/src/body/multipart_form_data/tests.rs">supports file upload</a>.</p>
    <form method="post" action="/form-multipart-enctype-post-method" enctype="multipart/form-data">
        <label>Field 1:
            <input name="field-1" />
        </label>

        <label>Field 2:
            <input name="field-2" />
        </label>

        <button>Save</button>
    </form>
</body>
</html>