MiscDirectives

pl.iterators.stir.server.directives.MiscDirectives
See theMiscDirectives companion trait

Attributes

Companion
trait
Source
MiscDirectives.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Inherited methods

Extracts the client's IP from either the X-Forwarded-For, Remote-Address, X-Real-IP header or the TCP connection the request was received from (in that order of priority).

Extracts the client's IP from either the X-Forwarded-For, Remote-Address, X-Real-IP header or the TCP connection the request was received from (in that order of priority).

Attributes

Inherited from:
MiscDirectives
Source
MiscDirectives.scala

Inspects the request's Accept-Language header and determines, which of the given language alternatives is preferred by the client. (See http://tools.ietf.org/html/rfc7231#section-5.3.5 for more details on the negotiation logic.) If there are several best language alternatives that the client has equal preference for (even if this preference is zero!) the order of the arguments is used as a tie breaker (First one wins).

Inspects the request's Accept-Language header and determines, which of the given language alternatives is preferred by the client. (See http://tools.ietf.org/html/rfc7231#section-5.3.5 for more details on the negotiation logic.) If there are several best language alternatives that the client has equal preference for (even if this preference is zero!) the order of the arguments is used as a tie breaker (First one wins).

Attributes

Inherited from:
MiscDirectives
Source
MiscDirectives.scala
def validate(check: => Boolean, errorMsg: String): Directive0

Checks the given condition before running its inner route. If the condition fails the route is rejected with a ValidationRejection.

Checks the given condition before running its inner route. If the condition fails the route is rejected with a ValidationRejection.

Attributes

Inherited from:
MiscDirectives
Source
MiscDirectives.scala