mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 00:21:08 +01:00
plain/text -> text/plain in comment (#362)
This commit is contained in:
parent
b6d26c9faf
commit
09aabc7b3b
@ -68,7 +68,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())
|
||||
/// });
|
||||
@ -177,7 +177,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 New Issue
Block a user