com.sksamuel.scruffy.processors

DefaultProcessors

Related Doc: package processors

trait DefaultProcessors extends ResponseConversions with ContentTypeProcessors with CookieProcessors with EntityProcessors with HeaderProcessors with QueryParamProcessors with SessionProcessors

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DefaultProcessors
  2. SessionProcessors
  3. QueryParamProcessors
  4. HeaderProcessors
  5. EntityProcessors
  6. CookieProcessors
  7. ContentTypeProcessors
  8. ResponseConversions
  9. ResponseBuilder
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. implicit class FutureOps[T] extends AnyRef

    Definition Classes
    ResponseConversions

Abstract Value Members

  1. implicit abstract val executor: ExecutionContext

    Definition Classes
    DefaultProcessorsResponseConversions

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. implicit def ToFutureOps[A](a: A): DefaultProcessors.FutureOps[A] { def self: A }

    Definition Classes
    ResponseBuilder
  5. def accepted: Response

    Definition Classes
    ResponseBuilder
  6. def ajax(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Processor that requires the request to identify itself as an ajax request by incuding the X-Requested-With header set to value "XMLRequest"

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def badGateway: Response

    Definition Classes
    ResponseBuilder
  9. def badRequest(reason: String): Response

    Definition Classes
    ResponseBuilder
  10. def badRequest: Response

    Definition Classes
    ResponseBuilder
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def conflict: Response

    Definition Classes
    ResponseBuilder
  13. def consumes(mediaTypes: MediaType*)(p: ⇒ Future[Response])(implicit req: Request): Future[Response]

    A Processor that will reject a request with 415 Unsupported Media Type if the content type of the request does not match one of the given content types.

    A Processor that will reject a request with 415 Unsupported Media Type if the content type of the request does not match one of the given content types.

    mediaTypes

    the media types accepted by this processor

    p

    the inner processor

    req

    the outer http request

    returns

    the inner processors http response

    Definition Classes
    ContentTypeProcessors
  14. def contentTypeOverride(mediaType: MediaType)(p: (Request) ⇒ Future[Response])(implicit req: Request): Future[Response]

    A processor that sets the content type of the request.

    A processor that sets the content type of the request.

    Definition Classes
    ContentTypeProcessors
  15. def cookie(name: String)(f: (Cookie) ⇒ Future[Response])(implicit req: Request): Future[Response]

    Adds a processor to the pipeline that requires the request to have a cookie with the given name.

    Adds a processor to the pipeline that requires the request to have a cookie with the given name. If the request does not contain the cookie then processing will skip to the next endpoint. The processor does not inspect the cookie value.

    name

    the cookie name that must be present on the request

    returns

    this

    Definition Classes
    CookieProcessors
  16. def created: Response

    Definition Classes
    ResponseBuilder
  17. def emptyBody(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Definition Classes
    EntityProcessors
  18. def entityAs[E](f: (E) ⇒ Future[Response])(implicit arg0: Manifest[E], req: Request): Future[Response]

    Definition Classes
    EntityProcessors
  19. implicit def entityFutureToResponseFuture(f: Future[Any]): Future[Response]

    Definition Classes
    ResponseConversions
  20. def entitySizeLimit(size: Int)(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Definition Classes
    EntityProcessors
  21. implicit def entityToResponseFuture(any: Any): Future[Response]

    Definition Classes
    ResponseConversions
  22. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  24. def expectationFailed: Response

    Definition Classes
    ResponseBuilder
  25. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def forbidden(reason: String): Response

    Definition Classes
    ResponseBuilder
  27. def forbidden: Response

    Definition Classes
    ResponseBuilder
  28. def found: Response

    Definition Classes
    ResponseBuilder
  29. def gatewayTimeout: Response

    Definition Classes
    ResponseBuilder
  30. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  31. def gone: Response

    Definition Classes
    ResponseBuilder
  32. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  33. def header(name: String, value: Any)(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

    A processor that requires the request to have a header with the given name and value.

    A processor that requires the request to have a header with the given name and value. If the request does not contain the header then processing will skip to the next endpoint.

    Definition Classes
    HeaderProcessors
  34. def header(name: HeaderName, value: Any)(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Definition Classes
    HeaderProcessors
  35. def header(name: String)(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Adds a processor to the pipeline that requires the request to have a header with the given name.

    Adds a processor to the pipeline that requires the request to have a header with the given name. The value is not inspected as part of this pipeline. If the request does not contain the header then processing will skip to the next endpoint.

    name

    the header that must be present on the request

    returns

    this

    Definition Classes
    HeaderProcessors
  36. def header(name: HeaderName)(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Adds a processor to the pipeline that requires the request to have a header with the given name.

    Adds a processor to the pipeline that requires the request to have a header with the given name. The value is not inspected as part of this pipeline. If the request does not contain the header then processing will skip to the next endpoint.

    name

    the header that must be present on the request

    returns

    this

    Definition Classes
    HeaderProcessors
  37. def hostname(regex: String)(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

  38. def http(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

  39. def https(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

  40. def ifMatch(name: String)(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

  41. def internalServerError(reason: String): Response

    Definition Classes
    ResponseBuilder
  42. def internalServerError: Response

    Definition Classes
    ResponseBuilder
  43. def internalServerError(e: Throwable): Response

    Definition Classes
    ResponseBuilder
  44. def ipAddress(regex: String)(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

  45. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  46. def json(p: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Adjusts the response from the inner processor by setting its content type to json

    Adjusts the response from the inner processor by setting its content type to json

    Definition Classes
    ContentTypeProcessors
  47. def lengthRequired: Response

    Definition Classes
    ResponseBuilder
  48. def methodNotAllowed: Response

    Definition Classes
    ResponseBuilder
  49. def movedPermanently: Response

    Definition Classes
    ResponseBuilder
  50. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  51. def nocontent: Response

    Definition Classes
    ResponseBuilder
  52. implicit def nodeToResponseFuture(node: Node): Future[Response]

    Definition Classes
    ResponseConversions
  53. def nonAuthoritativeInformation: Response

    Definition Classes
    ResponseBuilder
  54. def nonEmptyBody(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Definition Classes
    EntityProcessors
  55. def notAcceptable: Response

    Definition Classes
    ResponseBuilder
  56. def notFound(body: String): Response

    Definition Classes
    ResponseBuilder
  57. def notFound: Response

    Definition Classes
    ResponseBuilder
  58. def notImplemented: Response

    Definition Classes
    ResponseBuilder
  59. def notImplemented(reason: String): Response

    Definition Classes
    ResponseBuilder
  60. def notModified: Response

    Definition Classes
    ResponseBuilder
  61. final def notify(): Unit

    Definition Classes
    AnyRef
  62. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  63. def ok(ent: Any, contentType: MediaType): Response

    Creates a Response, which is a 200 OK, with the given entity set as the payload with the given content-type.

    Creates a Response, which is a 200 OK, with the given entity set as the payload with the given content-type.

    Definition Classes
    ResponseBuilder
  64. def ok(ent: Any, contentType: String): Response

    Creates a Response, which is a 200 OK, with the given entity set as the payload with the given content-type.

    Creates a Response, which is a 200 OK, with the given entity set as the payload with the given content-type.

    Definition Classes
    ResponseBuilder
  65. def ok(e: Any): Response

    Creaes a 200 ok response with the entity set to the given value, and the content type inferred.

    Creaes a 200 ok response with the entity set to the given value, and the content type inferred.

    Definition Classes
    ResponseBuilder
  66. def ok: Response

    Definition Classes
    ResponseBuilder
  67. def option2response(option: Option[_]): Response

    Definition Classes
    ResponseConversions
  68. implicit def optionFutureToResponseFuture(f: Future[Option[_]]): Future[Response]

    Definition Classes
    ResponseConversions
  69. implicit def optionToResponseFuture(o: Option[_]): Future[Response]

    Definition Classes
    ResponseConversions
  70. def param(name: String, value: String)(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Definition Classes
    QueryParamProcessors
  71. def param(name: String)(f: (String) ⇒ Future[Response])(implicit req: Request): Future[Response]

    Definition Classes
    QueryParamProcessors
  72. def partialContent: Response

    Definition Classes
    ResponseBuilder
  73. def paymentRequired: Response

    Definition Classes
    ResponseBuilder
  74. def permanentRedirect(location: String): Response

    Definition Classes
    ResponseBuilder
  75. def preconditionFailed: Response

    Definition Classes
    ResponseBuilder
  76. def proxyAuthenticationRequired: Response

    Definition Classes
    ResponseBuilder
  77. def rateLimit(requestsPerSecond: Double, warmupPeriod: FiniteDuration)(f: ⇒ Future[Response]): Future[Response]

  78. def rateLimit(limiter: RateLimiter)(f: ⇒ Future[Response]): Future[Response]

  79. def requestEntityTooLarge: Response

    Definition Classes
    ResponseBuilder
  80. def requestHeaderFieldsTooLarge: Response

    Definition Classes
    ResponseBuilder
  81. def requestTimeout: Response

    Definition Classes
    ResponseBuilder
  82. def requestURITooLong: Response

    Definition Classes
    ResponseBuilder
  83. def requestedRangeNotSatisfiable: Response

    Definition Classes
    ResponseBuilder
  84. def resetContent: Response

    Definition Classes
    ResponseBuilder
  85. implicit def responseToResponseFuture(resp: Response): Future[Response]

    Definition Classes
    ResponseConversions
  86. implicit def scalazValidation2responseFuture(v: ValidationNel[_, _]): Future[Response]

    Definition Classes
    ResponseConversions
  87. implicit def scalazValidationFuture2responseFuture(f: Future[ValidationNel[_, _]]): Future[Response]

    Definition Classes
    ResponseConversions
  88. def seeOther(location: String): Response

    Definition Classes
    ResponseBuilder
  89. def serviceUnavailable: Response

    Definition Classes
    ResponseBuilder
  90. def session(f: (Session) ⇒ Future[Response])(implicit req: Request): Future[Response]

    Extracts the current session.

    Extracts the current session. If no such session exists then will exit the route with a 500 Internal Service Error.

    Definition Classes
    SessionProcessors
  91. def sessionManager(manager: SessionManager)(f: (Session) ⇒ Future[Response])(implicit req: Request): Future[Response]

    Definition Classes
    SessionProcessors
  92. def sessionProperty[T](key: SessionKey[T])(f: (T) ⇒ Future[Response])(implicit req: Request): Future[Response]

    Extracts a property from the session.

    Extracts a property from the session. If the session does not exist then the endpoint will return a 500 Internal Service Error. If the property does not exist in the session then the route will return a 500 Internal Service Error.

    Definition Classes
    SessionProcessors
  93. def status(s: Int): Response

    Builds a Response with the status code set to a HttpStatus which has the value of the given int.

    Builds a Response with the status code set to a HttpStatus which has the value of the given int.

    Eg, status(200) will return a Response of 200

    Definition Classes
    ResponseBuilder
  94. def status(s: HttpStatus): Response

    Builds a Response with the status code set the given HttpStatus

    Builds a Response with the status code set the given HttpStatus

    Eg, status(HttpStatus.OK) will return a Response of 200

    Definition Classes
    ResponseBuilder
  95. implicit def statusToResponse(s: HttpStatus): Response

    Definition Classes
    ResponseConversions
  96. implicit def statusToResponseFuture(s: HttpStatus): Future[Response]

    Definition Classes
    ResponseConversions
  97. implicit def stringFutureToResponseFuture(f: Future[String]): Future[Response]

    Definition Classes
    ResponseConversions
  98. implicit def stringToResponseFuture(str: String): Future[Response]

    Definition Classes
    ResponseConversions
  99. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  100. def temporaryRedirect(location: String): Response

    Definition Classes
    ResponseBuilder
  101. def toString(): String

    Definition Classes
    AnyRef → Any
  102. def tooManyRequests: Response

    Definition Classes
    ResponseBuilder
  103. def try2response(t: Try[_]): Response

    Definition Classes
    ResponseConversions
  104. implicit def try2responseFuture(t: Try[_]): Future[Response]

    Definition Classes
    ResponseConversions
  105. implicit def tryFuture2responseFuture(f: Future[Try[_]]): Future[Response]

    Definition Classes
    ResponseConversions
  106. def unauthorized: Response

    Definition Classes
    ResponseBuilder
  107. def unit2response(unit: Unit): Response

    Definition Classes
    ResponseConversions
  108. implicit def unit2responseFuture(unit: Unit): Future[Response]

    Definition Classes
    ResponseConversions
  109. implicit def unitFuture2responseFuture(f: Future[Unit]): Future[Response]

    Definition Classes
    ResponseConversions
  110. def unprocessableEntity(reason: String): Response

    Definition Classes
    ResponseBuilder
  111. def unprocessableEntity: Response

    Definition Classes
    ResponseBuilder
  112. def unsupportedMediaType: Response

    Definition Classes
    ResponseBuilder
  113. def useProxy: Response

    Definition Classes
    ResponseBuilder
  114. def userAgent(regex: String)(f: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Definition Classes
    HeaderProcessors
  115. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  116. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  117. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  118. def xml(p: ⇒ Future[Response])(implicit req: Request): Future[Response]

    Creates a Response, which is a 200 OK, with the given entity set as an XML payload.

    Creates a Response, which is a 200 OK, with the given entity set as an XML payload.

    Definition Classes
    ContentTypeProcessors

Inherited from SessionProcessors

Inherited from QueryParamProcessors

Inherited from HeaderProcessors

Inherited from EntityProcessors

Inherited from CookieProcessors

Inherited from ContentTypeProcessors

Inherited from ResponseConversions

Inherited from ResponseBuilder

Inherited from AnyRef

Inherited from Any

Ungrouped