Struct hyper::header::AccessControlRequestHeaders [] [src]

pub struct AccessControlRequestHeaders(pub Vec<UniCase<String>>);

Access-Control-Request-Headers header, part of CORS

The Access-Control-Request-Headers header indicates which headers will be used in the actual request as part of the preflight request. during the actual request.

ABNF

Access-Control-Allow-Headers: "Access-Control-Allow-Headers" ":" #field-name

Example values

Examples

// extern crate unicase;

use hyper::header::{Headers, AccessControlRequestHeaders};
use unicase::UniCase;

let mut headers = Headers::new();
headers.set(
    AccessControlRequestHeaders(vec![UniCase("date".to_owned())])
);
// extern crate unicase;

use hyper::header::{Headers, AccessControlRequestHeaders};
use unicase::UniCase;

let mut headers = Headers::new();
headers.set(
    AccessControlRequestHeaders(vec![
        UniCase("accept-language".to_owned()),
        UniCase("date".to_owned()),
    ])
);