pub trait CgiRun {
// Required method
fn start_cgi(self, request: &Request) -> Result<Response, CgiError>;
}
Required Methods§
Sourcefn start_cgi(self, request: &Request) -> Result<Response, CgiError>
fn start_cgi(self, request: &Request) -> Result<Response, CgiError>
Dispatches a request to the process.
This function modifies the Command
to add all the required environment variables
and the request’s body, then executes the command and waits until the child process has
returned all the headers of the response. Once the headers have been sent back, this
function returns.
The body of the returned Response
will hold a handle to the child’s stdout output. This
means that the child can continue running in the background and send data to the client,
even after you have finished handling the request.