Struct hyper::header::AccessControlAllowHeaders [] [src]

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

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

The Access-Control-Allow-Headers header indicates, as part of the response to a preflight request, which header field names can be used 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, AccessControlAllowHeaders};
use unicase::UniCase;

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

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

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