Struct tinyhttp_internal::request::Request
source · pub struct Request { /* private fields */ }
Expand description
Struct containing data on a single request.
parsed_body which is a Option
body is used when the body of the request is not a String
Implementations§
source§impl Request
impl Request
pub fn new( raw_body: Vec<u8>, raw_headers: Vec<String>, status_line: Vec<String>, wildcard: Option<String> ) -> Request
sourcepub fn get_raw_body(&self) -> &Vec<u8>
pub fn get_raw_body(&self) -> &Vec<u8>
Get request body as bytes
sourcepub fn get_parsed_body(&self) -> Option<&String>
pub fn get_parsed_body(&self) -> Option<&String>
Get request body as a string
sourcepub fn get_headers(&self) -> &HashMap<String, String>
pub fn get_headers(&self) -> &HashMap<String, String>
Get request headers in a HashMap
sourcepub fn get_status_line(&self) -> &Vec<String>
pub fn get_status_line(&self) -> &Vec<String>
Get status line of request