com.stackmob.newman.dsl.ResponseHandlerDSL

ResponseHandler

case class ResponseHandler[Failure, Success](handlers: List[((HttpResponseCode) ⇒ Boolean, (HttpResponse) ⇒ Validation[Failure, Success])], resp: HttpResponse)(implicit errorConv: (Throwable) ⇒ Failure) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ResponseHandler
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ResponseHandler(handlers: List[((HttpResponseCode) ⇒ Boolean, (HttpResponse) ⇒ Validation[Failure, Success])], resp: HttpResponse)(implicit errorConv: (Throwable) ⇒ Failure)

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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def default(handler: (HttpResponse) ⇒ Validation[Failure, Success]): Validation[Failure, Success]

    Provide a default handler for all unhandled status codes.

    Provide a default handler for all unhandled status codes. Must be the last handler in the chain

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def expectJSONBody(code: HttpResponseCode)(implicit reader: net.liftweb.json.scalaz.JsonScalaz.JSONR[Success], m: Manifest[Success], charset: Charset = UTF8Charset): ResponseHandler[Failure, Success]

    Adds a handler that expects the specified response code and a JSON body readable by a JSONR for the type of this ResponseHandler.

    Adds a handler that expects the specified response code and a JSON body readable by a JSONR for the type of this ResponseHandler. A Response can only return one successful type per request so multiple calls to this method should not be made, however, if there are there is no effect on the handling of the response.

    returns

    a new com.stackmob.newman.dsl.ResponseHandler

  11. def expectNoContent(successValue: Success): ResponseHandler[Failure, Success]

    Adds a handler that expects a 204 response.

    Adds a handler that expects a 204 response. If encountered, the value passed to this method will be returned when the handler is sealed and the IO is performed. This method should only be called once per response but multiple calls have no effect

    successValue

    - the value to return successfully when a 204 is encountered

    returns

    a new ResponseHandler

  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def handleCode(code: HttpResponseCode)(handler: (HttpResponse) ⇒ Validation[Failure, Success]): ResponseHandler[Failure, Success]

    Adds a handler (a function that is called when the given code is matched) and returns a new ResponseHandler

    Adds a handler (a function that is called when the given code is matched) and returns a new ResponseHandler

    code

    response code this handler is for

    handler

    function to call when response with given code is encountered

    returns

  15. def handleCodes(codes: Seq[HttpResponseCode])(handler: (HttpResponse) ⇒ Validation[Failure, Success]): ResponseHandler[Failure, Success]

    Adds a handler (a function that is called when any of the given codes are matched) and returns a new ResponseHandler

    Adds a handler (a function that is called when any of the given codes are matched) and returns a new ResponseHandler

    codes

    response code this handler matches

    handler

    function to call when response with given code is encountered

    returns

  16. def handleCodesSuchThat(check: (HttpResponseCode) ⇒ Boolean)(handler: (HttpResponse) ⇒ Validation[Failure, Success]): ResponseHandler[Failure, Success]

    Adds a handler (a function that is called when the code matches the given function) and returns a new ResponseHandler

    Adds a handler (a function that is called when the code matches the given function) and returns a new ResponseHandler

    check

    response code this handler is for

    handler

    function to call when response with given code is encountered

    returns

  17. def handleJSONBody[S](code: HttpResponseCode)(handler: (S) ⇒ Validation[Failure, Success])(implicit reader: net.liftweb.json.scalaz.JsonScalaz.JSONR[S], m: Manifest[S], charset: Charset = UTF8Charset): ResponseHandler[Failure, Success]

    Adds a handler that expects the specified response code and a JSON body readable by a JSONR for the type of this ResponseHandler, which is then transformed by the supplied function.

    Adds a handler that expects the specified response code and a JSON body readable by a JSONR for the type of this ResponseHandler, which is then transformed by the supplied function. A Response can only return one successful type per request so multiple calls to this method should not be made, however, if there are there is no effect on the handling of the response. @return a new com.stackmob.newman.dsl.ResponseHandler

  18. val handlers: List[((HttpResponseCode) ⇒ Boolean, (HttpResponse) ⇒ Validation[Failure, Success])]

  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

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

    Definition Classes
    AnyRef
  23. val resp: HttpResponse

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toValidation: Validation[Failure, Success]

  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped