Struct fastcgi::Request [] [src]

pub struct Request {
    // some fields omitted
}

Request objects are what a FastCGI application will primarily deal with throughout its lifetime.

The Request API is designed to be an abstraction of the traditional CGI process model. Note that this API is low level. Dealing with things like GET/POST parameters or cookies is outside the scope of this library.

Methods

impl Request
[src]

fn role(&self) -> Role

fn param(&self, key: &str) -> Option<String>

Retrieves the value of the given parameter name.

fn params(&self) -> Params

Iterates over the FastCGI parameters.

fn stdin(&mut self) -> Stdin

Standard input stream of the request.

fn stdout(&mut self) -> Stdout

Standard output stream of the request.

fn stderr(&mut self) -> Stderr

Standard error stream of the request.

fn is_aborted(&self) -> bool

Checks if the client has closed the connection prematurely.

The reliability of this method depends on whether the web server notifies such event (by sending the FCGI_REQUEST_ABORTED record) to the FastCGI application. This value is updated synchronously; the update may only be triggered by reading from stdin.

fn exit(self, code: i32)

Reports the specified exit code to the web server.

This will consume the Request object. If you finish processing the Request object without calling exit, it is assumed that the exit code is 0.

Trait Implementations

impl Drop for Request
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more