Skip to main content

Module response

Module response 

Source
Expand description

Exports a trait for generating http responses, with a simple default implementation for string bodies.

§Example:

use torus_http::response::{HttpResponse, Response};
let response = HttpResponse::new().set_body("hey there").insert_header("Cool-Header", "so cool");
let response = "hello".to_response();

Structs§

HttpResponse
Struct that contains all the information that will be sent to the client

Traits§

Response
Trait that allows things to be sent back from the server