hyper_sync/header/common/
access_control_request_method.rs

1use method::Method;
2
3header! {
4    /// `Access-Control-Request-Method` header, part of
5    /// [CORS](http://www.w3.org/TR/cors/#access-control-request-method-request-header)
6    /// 
7    /// The `Access-Control-Request-Method` header indicates which method will be
8    /// used in the actual request as part of the preflight request.
9    /// # ABNF
10    ///
11    /// ```text
12    /// Access-Control-Request-Method: \"Access-Control-Request-Method\" \":\" Method
13    /// ```
14    /// 
15    /// # Example values
16    /// * `GET`
17    /// 
18    /// # Examples
19    ///
20    /// ```
21    /// use hyper_sync::header::{Headers, AccessControlRequestMethod};
22    /// use hyper_sync::Method;
23    /// 
24    /// let mut headers = Headers::new();
25    /// headers.set(AccessControlRequestMethod(Method::Get));
26    /// ```
27    (AccessControlRequestMethod, "Access-Control-Request-Method") => [Method]
28
29    test_access_control_request_method {
30        test_header!(test1, vec![b"GET"]);
31    }
32}