[][src]Function cgi::handle

pub fn handle<F>(func: F) where
    F: FnOnce(Request) -> Response

Call a function as a CGI programme.

This should be called from a main function. Parse & extract the CGI environmental variables, and HTTP request body, to create Request, and convert your Response into the correct format and print to stdout. If this programme is not called as CGI (e.g. missing required environmental variables), it will panic.