cogo_http/header/common/access_control_max_age.rs
1header! {
2 /// `Access-Control-Max-Age` header, part of
3 /// [CORS](http://www.w3.org/TR/cors/#access-control-max-age-response-header)
4 ///
5 /// The `Access-Control-Max-Age` header indicates how long the results of a
6 /// preflight request can be cached in a preflight result cache.
7 ///
8 /// # ABNF
9 /// ```plain
10 /// Access-Control-Max-Age = \"Access-Control-Max-Age\" \":\" delta-seconds
11 /// ```
12 ///
13 /// # Example values
14 /// * `531`
15 ///
16 /// # Examples
17 /// ```
18 /// use cogo_http::header::{Headers, AccessControlMaxAge};
19 ///
20 /// let mut headers = Headers::new();
21 /// headers.set(AccessControlMaxAge(1728000u32));
22 /// ```
23 (AccessControlMaxAge, "Access-Control-Max-Age") => [u32]
24
25 test_access_control_max_age {
26 test_header!(test1, vec![b"531"]);
27 }
28}