1- //! Client header advertising which media types the client is able to understand
1+ //! Client header advertising which media types the client is able to understand.
22
33use crate :: content:: { ContentType , MediaTypeProposal } ;
44use crate :: headers:: { HeaderName , HeaderValue , Headers , ToHeaderValues , ACCEPT } ;
@@ -9,15 +9,15 @@ use std::fmt::{self, Debug, Write};
99use std:: option;
1010use std:: slice;
1111
12- /// Client header advertising which media types the client is able to understand
12+ /// Client header advertising which media types the client is able to understand.
1313///
1414/// Using content negotiation, the server then selects one of the proposals, uses
1515/// it and informs the client of its choice with the `Content-Type` response
1616/// header. Browsers set adequate values for this header depending on the context
1717/// where the request is done: when fetching a CSS stylesheet a different value
1818/// is set for the request than when fetching an image, video or a script.
1919///
20- /// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding )
20+ /// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept)
2121///
2222/// # Specifications
2323///
@@ -34,7 +34,7 @@ use std::slice;
3434/// let mut accept = Accept::new();
3535/// accept.push(MediaTypeProposal::new(mime::HTML, Some(0.8))?);
3636/// accept.push(MediaTypeProposal::new(mime::XML, Some(0.4))?);
37- /// accept.push(MediaTypeProposal::new( mime::PLAIN, None)? );
37+ /// accept.push(mime::PLAIN);
3838///
3939/// let mut res = Response::new(200);
4040/// let content_type = accept.negotiate(&[mime::XML])?;
0 commit comments