com.sksamuel.scruffy

HttpModule

trait HttpModule extends ResponseBuilder with ResponseImplicits with DefaultProcessors with Processors

A trait that provides the entry point to the DSL.

Classes / objects that contain the endpoints for your application should extend this trait and call the get/post/delete/etc methods, providing the path to match on and the function chain.

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

Type Members

  1. implicit class FutureOps[A] extends AnyRef

    Definition Classes
    ResponseBuilder
  2. type Processor = (HttpRequest) ⇒ Future[HttpResponse]

    A Processor is a function that is applied with the HttpRequest and returns a Future of a HttpResponse.

    A Processor is a function that is applied with the HttpRequest and returns a Future of a HttpResponse. The HttpResponse (response) that is returned will be returned to the user if the status code is non zero.

    The function returns a response, rather than a modified HttpRequest, because we want to allow the DSL to return responses that do not require the exchange to be wrapped. Eg,

    someprocessor { req => "literal string" }

    If the Processor was HttpRequest => HttpRequest (or some other container class) then the final processor would need to be something like:

    someprocessor { req => req withResponse "literal string" }

    Which is just ugly, and more hassle.

    Definition Classes
    Processors
  3. implicit class RichFuture[T] extends AnyRef

    Definition Classes
    ResponseImplicits

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. val accepted: HttpResponse

    Definition Classes
    ResponseBuilder
  7. def add(listeners: Listener*): Unit

  8. def addHeader(name: String, v: String)(f: (HttpRequest) ⇒ Future[HttpResponse])(implicit executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    HeaderProcessors
  9. def addHeader(key: HeaderKey, v: String)(f: (HttpRequest) ⇒ Future[HttpResponse])(implicit executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    Adds a processor that adds a header with the given name and value to the response.

    Adds a processor that adds a header with the given name and value to the response. This is an alternative way of doing response.withHeader(h, v) on the response object.

    Definition Classes
    HeaderProcessors
  10. def ajax(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

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

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

    Definition Classes
    DefaultProcessors
  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. val badGateway: HttpResponse

    Definition Classes
    ResponseBuilder
  13. def badRequest(reason: String): HttpResponse

    Definition Classes
    ResponseBuilder
  14. val badRequest: HttpResponse

    Definition Classes
    ResponseBuilder
  15. implicit def byteArrayToFutureResponse(b: Array[Byte]): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  16. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def complete(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    This processor can be used when the last processor in an endpoint pipeline uses multiple parameters and you don't like the param => req => handler syntax.

    This processor can be used when the last processor in an endpoint pipeline uses multiple parameters and you don't like the param => req => handler syntax.

    Eg,

    get("myurl") {
    cookie("session") { sessionId => req =>
    s"My sessionId is " + sessionId
    }
    }
    
    can be re-written as
    
    get("myurl") {
    cookie("session") { sessionId => {
    complete { req =>
    s"My sessionId is $sessionId [$req]"
    }
    }
    }
    

    Definition Classes
    DefaultProcessors
  18. val conflict: HttpResponse

    Definition Classes
    ResponseBuilder
  19. def consumes(mediaTypes: MediaType*)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ContentTypeProcessors
  20. def contentTypeOverride(mediaType: MediaType)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    A processor that sets the content type of the request.

    A processor that sets the content type of the request.

    Definition Classes
    ContentTypeProcessors
  21. def cookie(name: String)(f: (Cookie) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    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
  22. def cookieValue(name: String)(f: (String) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    CookieProcessors
  23. val created: HttpResponse

    Definition Classes
    ResponseBuilder
  24. def define(method: Method, url: String, f: (HttpRequest) ⇒ Future[HttpResponse]): HttpEndpoint

    Attributes
    protected
  25. def delete(url: String)(p: (HttpRequest) ⇒ Future[HttpResponse]): HttpEndpoint

  26. def deleteCookie(name: String)(f: ⇒ (HttpRequest) ⇒ Future[HttpResponse])(implicit executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    A Processor that requests the removal of a cookie on the client side, by setting a cookie with the given name to a nonsense value, and a max age of -1.

    A Processor that requests the removal of a cookie on the client side, by setting a cookie with the given name to a nonsense value, and a max age of -1.

    Definition Classes
    CookieProcessors
  27. def entity(f: (Array[Byte]) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    EntityProcessors
  28. def entityAs[E](f: (E) ⇒ (HttpRequest) ⇒ Future[HttpResponse])(implicit manifest: Manifest[E], deserializer: Deserializer[E]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    EntityProcessors
  29. def entitySizeLimit(size: Int)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    EntityProcessors
  30. def entityToResponse(x: Any): HttpResponse

    Definition Classes
    ResponseImplicits
  31. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  33. var errorHandler: Option[ErrorHandler]

    Attributes
    protected[com.sksamuel.scruffy]
  34. def errors(f: ⇒ ErrorHandler): Unit

    Define error handling that will be chained to the existing error handlers.

    Define error handling that will be chained to the existing error handlers. Error handlers are invoked as a stack, so the last registered erorr handler will be the first invoked. If a particular error handler does not handle the given exceptions, then the next error handler in the stack will be invoked until the default error handling is reached. Only one error handler per module can be registered.

  35. implicit def exception2Response(e: Throwable): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  36. val expectationFailed: HttpResponse

    Definition Classes
    ResponseBuilder
  37. def filter(filter: HttpFilter): HttpModule.this.type

    Adds a filter that will run before each of the endpoints defined in this module.

    Adds a filter that will run before each of the endpoints defined in this module.

    Filters are only executed once per request, so if an endpoint skips to another endpoint, the filter will not be re-executed.

    Note: HttpModule specific filters (ie, filters added here) will be executed after server-wide specific filters (those registered with the endpoint container).

  38. var filters: ListBuffer[FilterHolder]

    Attributes
    protected[com.sksamuel.scruffy]
  39. def finalize(): Unit

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

    Definition Classes
    ResponseBuilder
  41. def forbidden: HttpResponse

    Definition Classes
    ResponseBuilder
  42. val found: HttpResponse

    Definition Classes
    ResponseBuilder
  43. implicit def futureTeeToFutureResponse[T](f: Future[T])(implicit fn: (T) ⇒ HttpResponse, executor: ExecutionContext): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  44. def gatewayTimeout: HttpResponse

    Definition Classes
    ResponseBuilder
  45. def get(url: String)(p: (HttpRequest) ⇒ Future[HttpResponse]): HttpEndpoint

  46. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  47. val gone: HttpResponse

    Definition Classes
    ResponseBuilder
  48. def hasHeader(name: HeaderName, value: Any)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    HeaderProcessors
  49. def hasHeader(name: String, value: Any)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Adds a processor to the pipeline 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.

    Adds a processor to the pipeline 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.

    name

    the header that must be present on the request

    returns

    this

    Definition Classes
    HeaderProcessors
  50. def hasHeader(name: HeaderName)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    HeaderProcessors
  51. def hasHeader(name: String)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    HeaderProcessors
  52. def hasQueryParam(name: String, value: String)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  53. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  54. def head(url: String)(p: (HttpRequest) ⇒ Future[HttpResponse]): HttpEndpoint

  55. def header(name: HeaderName)(f: (String) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    HeaderProcessors
  56. def header(name: String)(f: (String) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    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. 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
  57. def hostname(regex: String)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    DefaultProcessors
  58. def http(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    A Processor that only handles the request if the request is HTTP / un-secured

    A Processor that only handles the request if the request is HTTP / un-secured

    Definition Classes
    DefaultProcessors
  59. val httpEndpoints: ListBuffer[HttpEndpoint]

    Attributes
    protected[com.sksamuel.scruffy]
  60. def https(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    A Processor that only handles the request if the request is HTTPS / secure

    A Processor that only handles the request if the request is HTTPS / secure

    Definition Classes
    DefaultProcessors
  61. def ifMatch(name: String)(f: ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    HeaderProcessors
  62. def internalServerError(entity: Any): HttpResponse

    Definition Classes
    ResponseBuilder
  63. def internalServerError(reason: String): HttpResponse

    Definition Classes
    ResponseBuilder
  64. def internalServerError(e: Throwable): HttpResponse

    Definition Classes
    ResponseBuilder
  65. val internalServerError: HttpResponse

    Definition Classes
    ResponseBuilder
  66. def ipAddress(f: (String) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    DefaultProcessors
  67. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  68. def json[T](future: Future[T])(implicit serializer: Serializer[T], executor: ExecutionContext): Future[HttpResponse]

    Definition Classes
    ContentTypeProcessors
  69. def json[T](option: Option[T])(implicit serializer: Serializer[T]): Future[HttpResponse]

    Definition Classes
    ContentTypeProcessors
  70. def json[T](t: T)(implicit serializer: Serializer[T]): Future[HttpResponse]

    Definition Classes
    ContentTypeProcessors
  71. val lengthRequired: HttpResponse

    Definition Classes
    ResponseBuilder
  72. var listeners: ListBuffer[Listener]

    Attributes
    protected[com.sksamuel.scruffy]
  73. def marshall(mediaType: MediaType)(f: (HttpRequest) ⇒ Future[HttpResponse])(implicit serializer: Serializer[Any], executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ContentTypeProcessors
  74. def matchesIpAddress(regex: String)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Processes request only if the ipaddress in the request matches the given regex.

    Processes request only if the ipaddress in the request matches the given regex.

    Definition Classes
    DefaultProcessors
  75. val methodNotAllowed: HttpResponse

    Definition Classes
    ResponseBuilder
  76. val movedPermanently: HttpResponse

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

    Definition Classes
    AnyRef
  78. def noEntity(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    EntityProcessors
  79. val nocontent: HttpResponse

    Definition Classes
    ResponseBuilder
  80. implicit def nodeToEndpointFn(node: Node): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  81. implicit def nodeToFuture(node: Node): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  82. implicit def nodeToResponse(node: Node): HttpResponse

    Definition Classes
    ResponseImplicits
  83. val nonAuthoritativeInformation: HttpResponse

    Definition Classes
    ResponseBuilder
  84. val notAcceptable: HttpResponse

    Definition Classes
    ResponseBuilder
  85. def notFound(f: (HttpRequest) ⇒ HttpResponse): Unit

  86. def notFound(body: String): HttpResponse

    Definition Classes
    ResponseBuilder
  87. val notFound: HttpResponse

    Definition Classes
    ResponseBuilder
  88. var notFoundHandler: Option[(HttpRequest) ⇒ HttpResponse]

    Attributes
    protected[com.sksamuel.scruffy]
  89. def notImplemented(reason: String): HttpResponse

    Definition Classes
    ResponseBuilder
  90. val notImplemented: HttpResponse

    Definition Classes
    ResponseBuilder
  91. val notModified: HttpResponse

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

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

    Definition Classes
    AnyRef
  94. def ok(ent: Any, contentType: MediaType): HttpResponse

    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
  95. def ok(ent: Any, contentType: String): HttpResponse

    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
  96. def ok(e: Any): HttpResponse

    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
  97. val ok: HttpResponse

    Definition Classes
    ResponseBuilder
  98. implicit def optionToEndpointFn(o: Option[_]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  99. implicit def optionToEndpointFn(f: Future[Option[_]])(implicit executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  100. implicit def optionToFuture(o: Option[_]): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  101. implicit def optionToFuture(f: Future[Option[_]])(implicit executor: ExecutionContext): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  102. def options(url: String)(p: (HttpRequest) ⇒ Future[HttpResponse]): HttpEndpoint

  103. val partialContent: HttpResponse

    Definition Classes
    ResponseBuilder
  104. def pathParam(name: String)(f: (String) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    PathProcessors
  105. val paymentRequired: HttpResponse

    Definition Classes
    ResponseBuilder
  106. def permanentRedirect(location: String): HttpResponse

    Definition Classes
    ResponseBuilder
  107. def post(url: String)(p: (HttpRequest) ⇒ Future[HttpResponse]): HttpEndpoint

  108. def postfilter(fn: (HttpResponse) ⇒ HttpResponse)(implicit executor: ExecutionContext): HttpModule.this.type

  109. val preconditionFailed: HttpResponse

    Definition Classes
    ResponseBuilder
  110. def prefilter(fn: (HttpRequest) ⇒ HttpRequest): HttpModule.this.type

  111. val proxyAuthenticationRequired: HttpResponse

    Definition Classes
    ResponseBuilder
  112. def put(url: String)(p: (HttpRequest) ⇒ Future[HttpResponse]): HttpEndpoint

  113. def queryParam(name: String)(f: (String) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  114. def queryParam(name: String, default: String)(f: (String) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  115. def queryParamBoolean(name: String, default: Boolean)(f: (Boolean) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  116. def queryParamBoolean(name: String)(f: (Boolean) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  117. def queryParamDouble(name: String, default: Double)(f: (Double) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  118. def queryParamDouble(name: String)(f: (Double) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  119. def queryParamInt(name: String, default: Int)(f: (Int) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  120. def queryParamInt(name: String)(f: (Int) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  121. def queryParamLong(name: String, default: Long)(f: (Long) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  122. def queryParamLong(name: String)(f: (Long) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  123. def queryParamOpt(name: String)(f: (Option[String]) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  124. def queryParams(name: String)(f: (Seq[String]) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
  125. def rateLimit(requestsPerSecond: Double, warmupPeriod: FiniteDuration)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    DefaultProcessors
  126. def rateLimit(limiter: RateLimiter)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    DefaultProcessors
  127. implicit def redirectToFutureResponse(redirect: Redirect): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  128. implicit def redirectToResponse(redirect: Redirect): HttpResponse

    Definition Classes
    ResponseImplicits
  129. val requestEntityTooLarge: HttpResponse

    Definition Classes
    ResponseBuilder
  130. val requestHeaderFieldsTooLarge: HttpResponse

    Definition Classes
    ResponseBuilder
  131. val requestTimeout: HttpResponse

    Definition Classes
    ResponseBuilder
  132. val requestURITooLong: HttpResponse

    Definition Classes
    ResponseBuilder
  133. val requestedRangeNotSatisfiable: HttpResponse

    Definition Classes
    ResponseBuilder
  134. def requiresEntity(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    EntityProcessors
  135. val resetContent: HttpResponse

    Definition Classes
    ResponseBuilder
  136. implicit def responseFutureToProcessor(resp: Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  137. implicit def responseToFuture(resp: HttpResponse): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  138. implicit def responseToProcessorFn(resp: HttpResponse): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  139. implicit def scalazFailureToFutureResponse(f: Future[Failure[_]])(implicit executor: ExecutionContext): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  140. implicit def scalazFailureToFutureResponse(f: Failure[_]): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  141. implicit def scalazFailureToResponse(f: Failure[_]): HttpResponse

    Definition Classes
    ResponseImplicits
  142. implicit def scalazValToEndpointFn(v: ValidationNel[_, _])(implicit executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  143. implicit def scalazValToEndpointFn(f: Future[ValidationNel[_, _]])(implicit executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  144. implicit def scalazValToFutureResponse(f: Future[ValidationNel[_, _]])(implicit executor: ExecutionContext): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  145. implicit def scalazValToFutureResponse(v: ValidationNel[_, _]): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  146. implicit def scalazValToResponse(f: ValidationNel[_, _]): HttpResponse

    Definition Classes
    ResponseImplicits
  147. def schema(f: (String) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    A Processor that extracts the scheme from the request and makes it available in the inner processor.

    A Processor that extracts the scheme from the request and makes it available in the inner processor.

    f

    the inner processor function that accepts a String, which is the schema value.

    Definition Classes
    DefaultProcessors
  148. def seeOther(location: String): HttpResponse

    Definition Classes
    ResponseBuilder
  149. val serviceUnavailable: HttpResponse

    Definition Classes
    ResponseBuilder
  150. def session(f: (Session) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Extracts the current session.

    Extracts the current session. If no such session exists then a 500 Internal Server Error response will be generated and returned.

    Definition Classes
    SessionProcessors
  151. def sessionOption(f: (Option[Session]) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Extracts the current session as an Option.

    Extracts the current session as an Option. If no session exists then the value will be a None. This method will not create a session if one does not already exist.

    Definition Classes
    SessionProcessors
  152. def sessionProperty[T](key: SessionKey[T])(f: (T) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    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 endpoint will return a 500 Interal Service Error

    Definition Classes
    SessionProcessors
  153. def sessionPropertyOption[T](key: SessionKey[T])(f: (Option[T]) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Extracts an optional property from the session.

    Extracts an optional 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 then the nested processor will be invoked with a None.

    Definition Classes
    SessionProcessors
  154. def status(s: Int, reason: String): HttpResponse

    Definition Classes
    ResponseBuilder
  155. def status(s: Int): HttpResponse

    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
  156. def status(s: HttpStatus): HttpResponse

    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
  157. implicit def statusToFuture(s: HttpStatus): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  158. implicit def statusToProcessor(s: HttpStatus): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  159. implicit def statusToResponse(s: HttpStatus): HttpResponse

    Definition Classes
    ResponseImplicits
  160. implicit def stringToFuture(str: String): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  161. implicit def stringToFuture(f: Future[String])(implicit executor: ExecutionContext): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  162. implicit def stringToProcessor(str: String): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  163. implicit def stringToProcessor(f: Future[String])(implicit executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  164. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  165. implicit def tToFuture[T](t: T): Future[T]

    Definition Classes
    ResponseImplicits
  166. def temporaryRedirect(location: String): HttpResponse

    Definition Classes
    ResponseBuilder
  167. def toString(): String

    Definition Classes
    AnyRef → Any
  168. val tooManyRequests: HttpResponse

    Definition Classes
    ResponseBuilder
  169. def trace(url: String)(p: (HttpRequest) ⇒ Future[HttpResponse]): HttpEndpoint

  170. implicit def tryToEndpointFn(t: Try[_])(implicit executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  171. implicit def tryToEndpointFn(f: Future[Try[_]])(implicit executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  172. implicit def tryToFuture(t: Try[_])(implicit executor: ExecutionContext): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  173. implicit def tryToFuture(f: Future[Try[_]])(implicit executor: ExecutionContext): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  174. val unauthorized: HttpResponse

    Definition Classes
    ResponseBuilder
  175. implicit def unitToEndpointFn(unit: Unit): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  176. implicit def unitToEndpointFn(f: Future[Unit])(implicit executor: ExecutionContext): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  177. implicit def unitToFuture(unit: Unit): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  178. implicit def unitToFuture(f: Future[Unit])(implicit executor: ExecutionContext): Future[HttpResponse]

    Definition Classes
    ResponseImplicits
  179. implicit def unitToResponse(unit: Unit): HttpResponse

    Definition Classes
    ResponseImplicits
  180. def unprocessableEntity(reason: String): HttpResponse

    Definition Classes
    ResponseBuilder
  181. val unprocessableEntity: HttpResponse

    Definition Classes
    ResponseBuilder
  182. val unsupportedMediaType: HttpResponse

    Definition Classes
    ResponseBuilder
  183. val useProxy: HttpResponse

    Definition Classes
    ResponseBuilder
  184. def userAgent(regex: String)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    HeaderProcessors
  185. def userAgent(regex: Regex)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    The regex to match on the user agent

    The regex to match on the user agent

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def hasParam(name: String, value: String)(f: (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
    Annotations
    @deprecated
    Deprecated

    (Since version 1.13.3) prefer hasQueryParam

  2. def param(name: String)(f: (String) ⇒ (HttpRequest) ⇒ Future[HttpResponse]): (HttpRequest) ⇒ Future[HttpResponse]

    Definition Classes
    QueryParamProcessors
    Annotations
    @deprecated
    Deprecated

    (Since version 1.13.3) prefer queryParam

Inherited from DefaultProcessors

Inherited from SessionProcessors

Inherited from PathProcessors

Inherited from QueryParamProcessors

Inherited from HeaderProcessors

Inherited from EntityProcessors

Inherited from CookieProcessors

Inherited from ContentTypeProcessors

Inherited from ResponseImplicits

Inherited from Processors

Inherited from ResponseBuilder

Inherited from AnyRef

Inherited from Any

Ungrouped