org.apache.pekko.http.scaladsl.server

Members list

Type members

Classlikes

Rejection created by the various pekko.http.scaladsl.server.directives.SecurityDirectives. Signals that the request was rejected because the user could not be authenticated. The reason for the rejection is specified in the cause.

Rejection created by the various pekko.http.scaladsl.server.directives.SecurityDirectives. Signals that the request was rejected because the user could not be authenticated. The reason for the rejection is specified in the cause.

Attributes

Companion
object
Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
Rejection.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Rejection created by the 'authorize' directive. Signals that the request was rejected because the user is not authorized.

Rejection created by the 'authorize' directive. Signals that the request was rejected because the user is not authorized.

Attributes

Source
Rejection.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
Self type
final class CharsetNegotiator(requestHeaders: Seq[HttpHeader])

Attributes

Source
ContentNegotiation.scala
Supertypes
class Object
trait Matchable
class Any

Rejection created by the onCompleteWithBreaker directive. Signals that the request was rejected because the supplied circuit breaker is open and requests are failing fast.

Rejection created by the onCompleteWithBreaker directive. Signals that the request was rejected because the supplied circuit breaker is open and requests are failing fast.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Attributes

Companion
object
Source
Directive.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Source
Directive.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final class ContentNegotiator(requestHeaders: Seq[HttpHeader])

Attributes

Companion
object
Source
ContentNegotiation.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Source
ContentNegotiation.scala
Supertypes
class Object
trait Matchable
class Any
Self type
abstract class Directive[L](implicit val ev: Tuple[L])

A directive that provides a tuple of values of type L to create an inner route.

A directive that provides a tuple of values of type L to create an inner route.

Attributes

Companion
object
Source
Directive.scala
Supertypes
class Object
trait Matchable
class Any
object Directive

Attributes

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

Collects all default directives into one trait for simple importing.

object Directives extends Directives

Collects all default directives into one object for simple importing.

final class EncodingNegotiator(requestHeaders: Seq[HttpHeader])

Attributes

Companion
object
Source
ContentNegotiation.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Source
ContentNegotiation.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait ExceptionHandler extends PF

Attributes

Companion
object
Source
ExceptionHandler.scala
Supertypes
trait Throwable => Route
class Object
trait Matchable
class Any

Attributes

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

Rejection created when a websocket request was expected but none was found.

Rejection created when a websocket request was expected but none was found.

Attributes

Source
Rejection.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Source
PathMatcher.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Directives
object Directives
class HttpApp
object PathMatcher
Show all
final case class InvalidOriginRejection(allowedOrigins: Seq[HttpOrigin]) extends InvalidOriginRejection, Rejection

Rejection created by pekko.http.scaladsl.server.directives.HeaderDirectives.checkSameOrigin. Signals that the request was rejected because Origin header value is invalid.

Rejection created by pekko.http.scaladsl.server.directives.HeaderDirectives.checkSameOrigin. Signals that the request was rejected because Origin header value is invalid.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
final case class InvalidRequiredValueForQueryParamRejection(parameterName: String, expectedValue: String, actualValue: String) extends InvalidRequiredValueForQueryParamRejection, Rejection

Rejection created by parameter filters. Signals that the request was rejected because a query parameter value was not equal to required one.

Rejection created by parameter filters. Signals that the request was rejected because a query parameter value was not equal to required one.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
final class LanguageNegotiator(requestHeaders: Seq[HttpHeader])

Attributes

Companion
object
Source
ContentNegotiation.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Source
ContentNegotiation.scala
Supertypes
class Object
trait Matchable
class Any
Self type
sealed abstract class LowerPriorityRouteResultImplicits

Attributes

Source
RouteResult.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object RouteResult
sealed abstract class LowerPriorityRoutingLogImplicits

Attributes

Source
RoutingLog.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object RoutingLog

Rejection created by form field filters. Signals that the request was rejected because a form field could not be interpreted.

Rejection created by form field filters. Signals that the request was rejected because a form field could not be interpreted.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created by header directives. Signals that the request was rejected because a header value is malformed.

Rejection created by header directives. Signals that the request was rejected because a header value is malformed.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created by parameter filters. Signals that the request was rejected because a query parameter could not be interpreted.

Rejection created by parameter filters. Signals that the request was rejected because a query parameter could not be interpreted.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created by unmarshallers. Signals that the request was rejected because unmarshalling failed with an error that wasn't an IllegalArgumentException. Usually that means that the request content was not of the expected format. Note that semantic issues with the request content (e.g. because some parameter was out of range) will usually trigger a ValidationRejection instead.

Rejection created by unmarshallers. Signals that the request was rejected because unmarshalling failed with an error that wasn't an IllegalArgumentException. Usually that means that the request content was not of the expected format. Note that semantic issues with the request content (e.g. because some parameter was out of range) will usually trigger a ValidationRejection instead.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
final class MediaTypeNegotiator(requestHeaders: Seq[HttpHeader])

Attributes

Source
ContentNegotiation.scala
Supertypes
class Object
trait Matchable
class Any
final case class MethodRejection(supported: HttpMethod) extends MethodRejection, Rejection

Rejection created by method filters. Signals that the request was rejected because the HTTP method is unsupported.

Rejection created by method filters. Signals that the request was rejected because the HTTP method is unsupported.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created by attribute directives. Signals that the request was rejected because a required request attribute could not be found.

Rejection created by attribute directives. Signals that the request was rejected because a required request attribute could not be found.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
final case class MissingCookieRejection(cookieName: String) extends MissingCookieRejection, Rejection

Rejection created by the cookie directive. Signals that the request was rejected because a cookie was not found.

Rejection created by the cookie directive. Signals that the request was rejected because a cookie was not found.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created by form field filters. Signals that the request was rejected because a form field was not found.

Rejection created by form field filters. Signals that the request was rejected because a form field was not found.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
final case class MissingHeaderRejection(headerName: String) extends MissingHeaderRejection, Rejection

Rejection created by header directives. Signals that the request was rejected because a required header could not be found.

Rejection created by header directives. Signals that the request was rejected because a required header could not be found.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
final case class MissingQueryParamRejection(parameterName: String) extends MissingQueryParamRejection, Rejection

Rejection created by parameter filters. Signals that the request was rejected because a query parameter was not found.

Rejection created by parameter filters. Signals that the request was rejected because a query parameter was not found.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
abstract class PathMatcher[L](implicit val ev: Tuple[L]) extends Path => Matching[L]

A PathMatcher tries to match a prefix of a given string and returns either a PathMatcher.Matched instance if matched, otherwise PathMatcher.Unmatched.

A PathMatcher tries to match a prefix of a given string and returns either a PathMatcher.Matched instance if matched, otherwise PathMatcher.Unmatched.

Attributes

Companion
object
Source
PathMatcher.scala
Supertypes
trait Path => Matching[L]
class Object
trait Matchable
class Any
Known subtypes
class NumberMatcher[T]
object HexIntNumber
object HexLongNumber
object IntNumber
object LongNumber
object PathEnd
object Remaining
object RemainingPath
object Segment
object Slash
Show all
Self type

Attributes

Companion
class
Source
PathMatcher.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait PathMatchers

Attributes

Companion
object
Source
PathMatcher.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Directives
object Directives
class HttpApp
object PathMatchers
Show all
object PathMatchers extends PathMatchers

Attributes

Companion
trait
Source
PathMatcher.scala
Supertypes
trait PathMatchers
class Object
trait Matchable
class Any
Self type
trait Rejection extends Rejection

A rejection encapsulates a specific reason why a Route was not able to handle a request. Rejections are gathered up over the course of a Route evaluation and finally converted to pekko.http.scaladsl.model.HttpResponses by the handleRejections directive, if there was no way for the request to be completed.

A rejection encapsulates a specific reason why a Route was not able to handle a request. Rejections are gathered up over the course of a Route evaluation and finally converted to pekko.http.scaladsl.model.HttpResponses by the handleRejections directive, if there was no way for the request to be completed.

Attributes

Source
Rejection.scala
Supertypes
trait Rejection
class Object
trait Matchable
class Any
Known subtypes
final case class RejectionError(rejection: Rejection) extends RuntimeException

A Throwable wrapping a Rejection. Can be used for marshalling Future[T] or Try[T] instances, whose failure side is supposed to trigger a route rejection rather than an Exception that is handled by the nearest ExceptionHandler. (Custom marshallers can of course use it as well.)

A Throwable wrapping a Rejection. Can be used for marshalling Future[T] or Try[T] instances, whose failure side is supposed to trigger a route rejection rather than an Exception that is handled by the nearest ExceptionHandler. (Custom marshallers can of course use it as well.)

Attributes

Source
Rejection.scala
Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
trait RejectionHandler extends (Seq[Rejection]) => Option[Route]

Attributes

Companion
object
Source
RejectionHandler.scala
Supertypes
trait (Seq[Rejection]) => Option[Route]
class Object
trait Matchable
class Any
Self type

Attributes

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

Attributes

Source
Rejection.scala
Supertypes
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Known subtypes

This class is not meant to be extended by user code.

This class is not meant to be extended by user code.

Immutable object encapsulating the context of an pekko.http.scaladsl.model.HttpRequest as it flows through a pekko-http Route structure.

Attributes

Source
RequestContext.scala
Supertypes
class Object
trait Matchable
class Any

Rejection created by unmarshallers. Signals that the request was rejected because an message body entity was expected but not supplied.

Rejection created by unmarshallers. Signals that the request was rejected because an message body entity was expected but not supplied.

Attributes

Source
Rejection.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
Self type
object Route

Attributes

Source
Route.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Route.type

Attributes

Companion
object
Source
RouteConcatenation.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Directives
object Directives
class HttpApp

Attributes

Companion
trait
Source
RouteConcatenation.scala
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait RouteResult extends RouteResult

The result of handling a request.

The result of handling a request.

As a user you typically don't create RouteResult instances directly. Instead, use the methods on the RequestContext to achieve the desired effect.

Attributes

Companion
object
Source
RouteResult.scala
Supertypes
trait RouteResult
class Object
trait Matchable
class Any
Known subtypes
class Complete
class Rejected

Attributes

Companion
trait
Source
RouteResult.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Show all
Self type
trait RoutingLog

Attributes

Companion
object
Source
RoutingLog.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Source
RoutingLog.scala
Supertypes
class Object
trait Matchable
class Any
Self type
RoutingLog.type
final case class SchemeRejection(supported: String) extends SchemeRejection, Rejection

Rejection created by scheme filters. Signals that the request was rejected because the Uri scheme is unsupported.

Rejection created by scheme filters. Signals that the request was rejected because the Uri scheme is unsupported.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
abstract class StandardRoute extends Route

A Route that can be implicitly converted into a Directive (fitting any signature).

A Route that can be implicitly converted into a Directive (fitting any signature).

Attributes

Companion
object
Source
StandardRoute.scala
Supertypes
class Object
trait Matchable
class Any
object StandardRoute

Attributes

Companion
class
Source
StandardRoute.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class TooManyRangesRejection(maxRanges: Int) extends TooManyRangesRejection, Rejection

Rejection created by range directives. Signals that the request contains too many ranges. An irregular high number of ranges indicates a broken client or a denial of service attack.

Rejection created by range directives. Signals that the request contains too many ranges. An irregular high number of ranges indicates a broken client or a denial of service attack.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all
final case class TransformationRejection(transform: (Seq[Rejection]) => Seq[Rejection]) extends TransformationRejection, Rejection

A special Rejection that serves as a container for a transformation function on rejections. It is used by some directives to "cancel" rejections that are added by later directives of a similar type.

A special Rejection that serves as a container for a transformation function on rejections. It is used by some directives to "cancel" rejections that are added by later directives of a similar type.

Consider this route structure for example:

   put { reject(ValidationRejection("no") } ~ get { ... }

If this structure is applied to a PUT request the list of rejections coming back contains three elements:

  1. A ValidationRejection
  2. A MethodRejection
  3. A TransformationRejection holding a function filtering out the MethodRejection

so that in the end the RejectionHandler will only see one rejection (the ValidationRejection), because the MethodRejection added by the get directive is canceled by the put directive (since the HTTP method did indeed match eventually).

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created by marshallers. Signals that the request was rejected because the service is not capable of producing a response entity whose content type is accepted by the client

Rejection created by marshallers. Signals that the request was rejected because the service is not capable of producing a response entity whose content type is accepted by the client

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created by encoding filters. Signals that the request was rejected because the service is not capable of producing a response entity whose content encoding is accepted by the client

Rejection created by encoding filters. Signals that the request was rejected because the service is not capable of producing a response entity whose content encoding is accepted by the client

Attributes

Companion
object
Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
Rejection.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class UnsatisfiableRangeRejection(unsatisfiableRanges: Seq[ByteRange], actualEntityLength: Long) extends UnsatisfiableRangeRejection, Rejection

Rejection created by range directives. Signals that the request was rejected because the requests contains only unsatisfiable ByteRanges. The actualEntityLength gives the client a hint to create satisfiable ByteRanges.

Rejection created by range directives. Signals that the request was rejected because the requests contains only unsatisfiable ByteRanges. The actualEntityLength gives the client a hint to create satisfiable ByteRanges.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created by unmarshallers. Signals that the request was rejected because the requests content-type is unsupported.

Rejection created by unmarshallers. Signals that the request was rejected because the requests content-type is unsupported.

Attributes

Companion
object
Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created by decoding filters. Signals that the request was rejected because the requests content encoding is unsupported.

Rejection created by decoding filters. Signals that the request was rejected because the requests content encoding is unsupported.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created when a websocket request was not handled because none of the given subprotocols was supported.

Rejection created when a websocket request was not handled because none of the given subprotocols was supported.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Rejection created by the validation directive as well as for IllegalArgumentExceptions thrown by domain model constructors (e.g. via require). It signals that an expected value was semantically invalid.

Rejection created by the validation directive as well as for IllegalArgumentExceptions thrown by domain model constructors (e.g. via require). It signals that an expected value was semantically invalid.

Attributes

Source
Rejection.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Rejection
trait Rejection
class Object
trait Matchable
class Any
Show all

Deprecated classlikes

abstract class HttpApp extends Directives

DEPRECATED, consider https://github.com/apache/pekko-http-quickstart-scala.g8 instead

DEPRECATED, consider https://github.com/apache/pekko-http-quickstart-scala.g8 instead

Bootstrap trait for Http Server. It helps booting up a pekko-http server by only defining the desired routes. It offers additional hooks to modify the default behavior.

Attributes

Deprecated
true
Source
HttpApp.scala
Supertypes

Types

Attributes

Source
package.scala
type Directive1[T] = Directive[Tuple1[T]]

Attributes

Source
package.scala

Attributes

Source
package.scala

Attributes

Source
package.scala

Attributes

Source
package.scala
type RouteGenerator[T] = T => Route

Attributes

Source
package.scala

Value members

Concrete methods

def FIXME: Nothing

Attributes

Source
package.scala