pub struct Allow(_);Expand description
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 = #methodExample values
GET, HEAD, PUTOPTIONS, GET, PUT, POST, DELETE, HEAD, TRACE, CONNECT, PATCH, fOObAr- ``
Examples
extern crate http;
use headers::Allow;
use http::Method;
let allow = vec![Method::GET, Method::POST]
.into_iter()
.collect::<Allow>();