Struct hyper::header::Allow
[−]
[src]
pub struct Allow(pub Vec<Method>);
Allow
header, defined in RFC7231
The Allow
header field lists the set of methods advertised as
supported by the target resource. The purpose of this field is
strictly to inform the recipient of valid request methods associated
with the resource.
ABNF
Allow = #method
Example values
GET, HEAD, PUT
OPTIONS, GET, PUT, POST, DELETE, HEAD, TRACE, CONNECT, PATCH, fOObAr
- ``
Examples
use hyper::header::{Headers, Allow}; use hyper::Method; let mut headers = Headers::new(); headers.set( Allow(vec![Method::Get]) );
use hyper::header::{Headers, Allow}; use hyper::Method; let mut headers = Headers::new(); headers.set( Allow(vec![ Method::Get, Method::Post, Method::Patch, Method::Extension("COPY".to_owned()), ]) );