[−][src]Function cgi::text_response
pub fn text_response<T, S>(status_code: T, body: S) -> Response where
StatusCode: TryFrom<T>,
<StatusCode as TryFrom<T>>::Error: Into<Error>,
S: Into<String>,
Serves this content as text/plain
text response, with that status code
ⓘThis example is not tested
extern crate cgi; cgi::cgi_main! { |request: cgi::Request| -> cgi::Response { cgi::text_response(200, "Hello world"); } }