Struct http_stub::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()),
    ])
);

Trait Implementations

impl Display for AccessControlRequestHeaders

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl HeaderFormat for AccessControlRequestHeaders

fn fmt_header(&self, f: &mut Formatter) -> Result<(), Error>

impl Header for AccessControlRequestHeaders

fn header_name() -> &'static str

fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlRequestHeaders, Error>

impl DerefMut for AccessControlRequestHeaders

fn deref_mut(&mut self) -> &mut Vec<UniCase<String>>

impl Deref for AccessControlRequestHeaders

type Target = Vec<UniCase<String>>

fn deref(&self) -> &Vec<UniCase<String>>

Derived Implementations

impl Debug for AccessControlRequestHeaders

fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>

impl PartialEq<AccessControlRequestHeaders> for AccessControlRequestHeaders

fn eq(&self, __arg_0: &AccessControlRequestHeaders) -> bool

fn ne(&self, __arg_0: &AccessControlRequestHeaders) -> bool

impl Clone for AccessControlRequestHeaders

fn clone(&self) -> AccessControlRequestHeaders