Interface HostDirectives
-
- All Known Subinterfaces:
Directives
- All Known Implementing Classes:
Directives$,HostDirectives$,HttpApp
public interface HostDirectives
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Directive<scala.Tuple1<java.lang.String>>extractHost()Extracts the hostname part of the Host request header value.Directive<scala.runtime.BoxedUnit>host(scala.collection.immutable.Seq<java.lang.String> hostNames)Rejects all requests with a host name different from the given ones.Directive<scala.runtime.BoxedUnit>host(scala.Function1<java.lang.String,java.lang.Object> predicate)Rejects all requests for whose host name the given predicate function returns false.Directive<scala.Tuple1<java.lang.String>>host(scala.util.matching.Regex regex)Rejects all requests with a host name that doesn't have a prefix matching the given regular expression.
-
-
-
Method Detail
-
extractHost
Directive<scala.Tuple1<java.lang.String>> extractHost()
Extracts the hostname part of the Host request header value.- Returns:
- (undocumented)
-
host
Directive<scala.runtime.BoxedUnit> host(scala.collection.immutable.Seq<java.lang.String> hostNames)
Rejects all requests with a host name different from the given ones.- Parameters:
hostNames- (undocumented)- Returns:
- (undocumented)
-
host
Directive<scala.runtime.BoxedUnit> host(scala.Function1<java.lang.String,java.lang.Object> predicate)
Rejects all requests for whose host name the given predicate function returns false.- Parameters:
predicate- (undocumented)- Returns:
- (undocumented)
-
host
Directive<scala.Tuple1<java.lang.String>> host(scala.util.matching.Regex regex)
Rejects all requests with a host name that doesn't have a prefix matching the given regular expression. For all matching requests the prefix string matching the regex is extracted and passed to the inner route. If the regex contains a capturing group only the string matched by this group is extracted. If the regex contains more than one capturing group an IllegalArgumentException is thrown.- Parameters:
regex- (undocumented)- Returns:
- (undocumented)
-
-