trait BasicDirectives extends AnyRef

Source
BasicDirectives.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. BasicDirectives
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from BasicDirectives toany2stringadd[BasicDirectives] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (BasicDirectives, B)
    Implicit
    This member is added by an implicit conversion from BasicDirectives toArrowAssoc[BasicDirectives] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def cancelRejection(rejection: Rejection): Directive0

    Adds a TransformationRejection cancelling all rejections equal to the given one to the list of rejections potentially coming back from the inner route.

  8. def cancelRejections(cancelFilter: (Rejection) => Boolean): Directive0

    Adds a TransformationRejection cancelling all rejections for which the given filter function returns true to the list of rejections potentially coming back from the inner route.

  9. def cancelRejections(classes: Class[_]*): Directive0

    Adds a TransformationRejection cancelling all rejections of one of the given classes to the list of rejections potentially coming back from the inner route.

  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  11. def ensuring(cond: (BasicDirectives) => Boolean, msg: => Any): BasicDirectives
    Implicit
    This member is added by an implicit conversion from BasicDirectives toEnsuring[BasicDirectives] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (BasicDirectives) => Boolean): BasicDirectives
    Implicit
    This member is added by an implicit conversion from BasicDirectives toEnsuring[BasicDirectives] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: => Any): BasicDirectives
    Implicit
    This member is added by an implicit conversion from BasicDirectives toEnsuring[BasicDirectives] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): BasicDirectives
    Implicit
    This member is added by an implicit conversion from BasicDirectives toEnsuring[BasicDirectives] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def extract[T](f: (RequestContext) => T): Directive1[T]

    Extracts a single value using the given function.

  18. def extractActorSystem: Directive1[ActorSystem]

    Extracts the pekko.actor.ActorSystem if the available Materializer is an pekko.stream.ActorMaterializer.

    Extracts the pekko.actor.ActorSystem if the available Materializer is an pekko.stream.ActorMaterializer. Otherwise throws an exception as it won't be able to extract the system from arbitrary materializers.

  19. def extractDataBytes: Directive1[Source[ByteString, Any]]

    Extracts the entities dataBytes pekko.stream.scaladsl.Source from the pekko.http.scaladsl.server.RequestContext.

  20. def extractExecutionContext: Directive1[ExecutionContextExecutor]

    Extracts the scala.concurrent.ExecutionContextExecutor from the pekko.http.scaladsl.server.RequestContext.

  21. def extractLog: Directive1[LoggingAdapter]

    Extracts the pekko.event.LoggingAdapter from the pekko.http.scaladsl.server.RequestContext.

  22. def extractMatchedPath: Directive1[Path]

    Extracts the already matched path from the RequestContext.

  23. def extractMaterializer: Directive1[Materializer]

    Extracts the pekko.stream.Materializer from the pekko.http.scaladsl.server.RequestContext.

  24. def extractParserSettings: Directive1[ParserSettings]

    Extracts the pekko.http.scaladsl.settings.ParserSettings from the pekko.http.scaladsl.server.RequestContext.

  25. def extractRequest: Directive1[HttpRequest]

    Extracts the current HttpRequest instance.

  26. def extractRequestContext: Directive1[RequestContext]

    Extracts the pekko.http.scaladsl.server.RequestContext itself.

  27. def extractRequestEntity: Directive1[RequestEntity]

    Extracts the pekko.http.scaladsl.model.RequestEntity from the pekko.http.scaladsl.server.RequestContext.

  28. def extractSettings: Directive1[RoutingSettings]

    Extracts the RoutingSettings from the pekko.http.scaladsl.server.RequestContext.

  29. def extractStrictEntity(timeout: FiniteDuration, maxBytes: Long): Directive1[Strict]

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    To help protect against excessive memory use, the request will be aborted if the request is larger than allowed by the pekko.http.parsing.max-to-strict-bytes configuration setting.

    Converts the HttpEntity from the pekko.http.scaladsl.server.RequestContext into an pekko.http.scaladsl.model.HttpEntity.Strict and extracts it, or fails the route if unable to drain the entire request body within the timeout.

    timeout

    The directive is failed if the stream isn't completed after the given timeout.

  30. def extractStrictEntity(timeout: FiniteDuration): Directive1[Strict]

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    To help protect against excessive memory use, the request will be aborted if the request is larger than allowed by the pekko.http.parsing.max-to-strict-bytes configuration setting.

    Converts the HttpEntity from the pekko.http.scaladsl.server.RequestContext into an pekko.http.scaladsl.model.HttpEntity.Strict and extracts it, or fails the route if unable to drain the entire request body within the timeout.

    timeout

    The directive is failed if the stream isn't completed after the given timeout.

  31. def extractUnmatchedPath: Directive1[Path]

    Extracts the yet unmatched path from the RequestContext.

  32. def extractUri: Directive1[Uri]

    Extracts the complete request URI.

  33. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  34. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  35. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  36. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  37. def mapInnerRoute(f: (Route) => Route): Directive0

  38. def mapRejections(f: (Seq[Rejection]) => Seq[Rejection]): Directive0

  39. def mapRequest(f: (HttpRequest) => HttpRequest): Directive0

  40. def mapRequestContext(f: (RequestContext) => RequestContext): Directive0

  41. def mapResponse(f: (HttpResponse) => HttpResponse): Directive0

  42. def mapResponseEntity(f: (ResponseEntity) => ResponseEntity): Directive0

  43. def mapResponseHeaders(f: (Seq[HttpHeader]) => Seq[HttpHeader]): Directive0

  44. def mapRouteResult(f: (RouteResult) => RouteResult): Directive0

  45. def mapRouteResultFuture(f: (Future[RouteResult]) => Future[RouteResult]): Directive0

  46. def mapRouteResultPF(f: PartialFunction[RouteResult, RouteResult]): Directive0

  47. def mapRouteResultWith(f: (RouteResult) => Future[RouteResult]): Directive0

  48. def mapRouteResultWithPF(f: PartialFunction[RouteResult, Future[RouteResult]]): Directive0

  49. def mapSettings(f: (RoutingSettings) => RoutingSettings): Directive0

    Runs the inner route with settings mapped by the given function.

  50. def mapUnmatchedPath(f: (Path) => Path): Directive0

    Transforms the unmatchedPath of the RequestContext using the given function.

  51. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  52. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  53. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  54. def pass: Directive0

    A Directive0 that always passes the request on to its inner route (i.e.

    A Directive0 that always passes the request on to its inner route (i.e. does nothing with the request or the response).

  55. def provide[T](value: T): Directive1[T]

    Injects the given value into a directive.

  56. def recoverRejections(f: (Seq[Rejection]) => RouteResult): Directive0

  57. def recoverRejectionsWith(f: (Seq[Rejection]) => Future[RouteResult]): Directive0

  58. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  59. def textract[L](f: (RequestContext) => L)(implicit arg0: Tuple[L]): Directive[L]

    Extracts a number of values using the given function.

  60. def toStrictEntity(timeout: FiniteDuration, maxBytes: Long): Directive0

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    To help protect against excessive memory use, the request will be aborted if the request is larger than allowed by the pekko.http.parsing.max-to-strict-bytes configuration setting.

    Extracts the pekko.http.scaladsl.server.RequestContext itself with the strict HTTP entity, or fails the route if unable to drain the entire request body within the timeout.

    timeout

    The directive is failed if the stream isn't completed after the given timeout.

  61. def toStrictEntity(timeout: FiniteDuration): Directive0

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    To help protect against excessive memory use, the request will be aborted if the request is larger than allowed by the pekko.http.parsing.max-to-strict-bytes configuration setting.

    Extracts the pekko.http.scaladsl.server.RequestContext itself with the strict HTTP entity, or fails the route if unable to drain the entire request body within the timeout.

    timeout

    The directive is failed if the stream isn't completed after the given timeout.

  62. def toString(): String
    Definition Classes
    AnyRef → Any
  63. def tprovide[L](values: L)(implicit arg0: Tuple[L]): Directive[L]

    Injects the given values into a directive.

  64. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  65. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  66. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  67. def withExecutionContext(ec: ExecutionContextExecutor): Directive0

    Runs its inner route with the given alternative scala.concurrent.ExecutionContextExecutor.

  68. def withLog(log: LoggingAdapter): Directive0

    Runs its inner route with the given alternative pekko.event.LoggingAdapter.

  69. def withMaterializer(materializer: Materializer): Directive0

    Runs its inner route with the given alternative pekko.stream.Materializer.

  70. def withSettings(settings: RoutingSettings): Directive0

    Runs its inner route with the given alternative RoutingSettings.

Deprecated Value Members

  1. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from BasicDirectives toStringFormat[BasicDirectives] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  2. def [B](y: B): (BasicDirectives, B)
    Implicit
    This member is added by an implicit conversion from BasicDirectives toArrowAssoc[BasicDirectives] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromBasicDirectives to any2stringadd[BasicDirectives]

Inherited by implicit conversion StringFormat fromBasicDirectives to StringFormat[BasicDirectives]

Inherited by implicit conversion Ensuring fromBasicDirectives to Ensuring[BasicDirectives]

Inherited by implicit conversion ArrowAssoc fromBasicDirectives to ArrowAssoc[BasicDirectives]

Basic directives

Ungrouped