fn read_request(buffer: &str) -> Result<Request> {
    let lines: Vec<&str> = buffer.split("\r\n").collect();
    let request_identifiers = get_request_identifiers(&lines)?;
    let headers = get_headers(&lines.into_iter().skip(1).collect())?;

    Ok(Request {
        request_identifiers,
        headers,
        body: "".to_string(), //todo change to real implementation
    })
}
/// Reads the contents from the byte Vector into the Request object.
Reads the contents from the byte Vector into the Request object.
Reads the contents from the byte Vector into the Request object .
fn read_request(buffer: &str) -> Result<Request> {
    let lines: Vec<&str> = buffer.split("\r\n").collect();
    let request_identifiers = get_request_identifiers(&lines)?;
    let headers = get_headers(&lines.into_iter().skip(1).collect())?;
    Ok(Request {
        request_identifiers,
        headers,
        body: "".to_string(), //todo change to real implementation
    })
}
fn read_request ( buffer : & str ) -> Result < Request > { let lines : Vec < & str > = buffer . split ( " \r \n " ) . collect ( ) ; let request_identifiers = get_request_identifiers ( & lines ) ? ; let headers = get_headers ( & lines . into_iter ( ) . skip ( 1 ) . collect ( ) ) ? ; Ok ( Request { request_identifiers , headers , body : " " . to_string ( ) , //todo change to real implementation } ) }
Reads the contents from the byte Vector into the Request object.
Reads the contents from the byte Vector into the Request object .
buffer
&str
buffer
&str