Function hyper::http::read_status_line [-] [+] [src]

pub fn read_status_line<R: Read>(stream: &mut R) -> HttpResult<StatusLine>

Read the StatusLine, such as HTTP/1.1 200 OK.

The first line of a response message is the status-line, consisting of the protocol version, a space (SP), the status code, another space, a possibly empty textual phrase describing the status code, and ending with CRLF.

status-line = HTTP-version SP status-code SP reason-phrase CRLF
status-code    = 3DIGIT
reason-phrase  = *( HTAB / SP / VCHAR / obs-text )