pub fn parse_request(buffer: Vec<u8>) -> Result<Request> {
    let raw_request = match String::from_utf8(buffer) {
        Ok(string) => string,
        Err(_) => return Err(Box::new(Box::new(InvalidRequest{message: "Request could not be interpreted as string.".to_string()})))
    };

    read_request(&raw_request)
}
/// Parses the byte Vector stream into Request object.
Parses the byte Vector stream into Request object.
Parses the byte Vector stream into Request object .
pub fn parse_request(buffer: Vec<u8>) -> Result<Request> {
    let raw_request = match String::from_utf8(buffer) {
        Ok(string) => string,
        Err(_) => return Err(Box::new(Box::new(InvalidRequest{message: "Request could not be interpreted as string.".to_string()})))
    };
    read_request(&raw_request)
}
pub fn parse_request ( buffer : Vec < u8 > ) -> Result < Request > { let raw_request = match String :: from_utf8 ( buffer ) { Ok ( string ) => string , Err ( _ ) => return Err ( Box :: new ( Box :: new ( InvalidRequest { message : " " . to_string ( ) } ) ) ) } ; read_request ( & raw_request ) }
Parses the byte Vector stream into Request object.
Parses the byte Vector stream into Request object .
buffer
Vec<u8>
buffer
Vec<u8>