mirror of
https://github.com/actix/actix-web.git
synced 2024-12-21 15:46:48 +00:00
Merge branch 'master' of github.com:actix/actix-web
This commit is contained in:
commit
f559f23e1c
1 changed files with 3 additions and 2 deletions
|
@ -66,7 +66,7 @@ impl<S: 'static> Predicate<S> for AnyPredicate<S> {
|
|||
/// r.route()
|
||||
/// .filter(
|
||||
/// pred::All(pred::Get())
|
||||
/// .and(pred::Header("content-type", "plain/text")),
|
||||
/// .and(pred::Header("content-type", "text/plain")),
|
||||
/// )
|
||||
/// .f(|_| HttpResponse::MethodNotAllowed())
|
||||
/// });
|
||||
|
@ -175,7 +175,8 @@ pub fn Method<S: 'static>(method: http::Method) -> MethodPredicate<S> {
|
|||
/// Return predicate that matches if request contains specified header and
|
||||
/// value.
|
||||
pub fn Header<S: 'static>(
|
||||
name: &'static str, value: &'static str,
|
||||
name: &'static str,
|
||||
value: &'static str,
|
||||
) -> HeaderPredicate<S> {
|
||||
HeaderPredicate(
|
||||
header::HeaderName::try_from(name).unwrap(),
|
||||
|
|
Loading…
Reference in a new issue