c

net.liftweb.http.testing

TheResponse

class TheResponse extends BaseResponse with ToBoxTheResponse

The response to an HTTP request, as long as the server responds with *SOMETHING*

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TheResponse
  2. ToBoxTheResponse
  3. BaseResponse
  4. GetPosterHelper
  5. BaseGetPoster
  6. Response
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TheResponse(baseUrl: String, code: Int, msg: String, headers: Map[String, List[String]], body: Box[Array[Byte]], theHttpClient: HttpClient)

Type Members

  1. abstract type FuncType
    Definition Classes
    Response
  2. type ResponseType = Box[TheResponse]
    Definition Classes
    ToBoxTheResponse
  3. type SelfType = TheResponse
    Definition Classes
    TheResponseResponse

Value Members

  1. def !(code: Int, msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test that the server gave a particular response code.

    Test that the server gave a particular response code. If the response is not a 200, call the errorFunc with the msg

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  2. def !(msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test that the server gave a response.

    Test that the server gave a response. If the server failed to respond, call the errorFunc with the msg

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  3. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def !@(msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test the response as a 200.

    Test the response as a 200. If the response is not a 200, call the errorFunc with the msg

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  5. def !\(label: String, msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test that the server response does not contain a node with a particular label as a direct child.

    Test that the server response does not contain a node with a particular label as a direct child. If the response does contain valid xml and does contain the node, call the errorFunc with the msg

    label

    the label for the XML node to search for in the response

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  6. def !\(node: Node, msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test that the server response does not contain a particular node as a direct child with the exact attributes and children.

    Test that the server response does not contain a particular node as a direct child with the exact attributes and children. If the response does contain valid xml and does contain the exact node, call the errorFunc with the msg.

    node

    the XML node to search for in the response

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  7. def !\\(label: String, msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test that the server response does not contain a node with a particular label anywhere in the xml.

    Test that the server response does not contain a node with a particular label anywhere in the xml. If the response does contain valid xml and does contain the node, call the errorFunc with the msg

    label

    the label for the XML node to search for in the response

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  8. def !\\(node: Node, msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test that the server response does not contain a particular node anywhere in the xml with the exact attributes and children.

    Test that the server response does not contain a particular node anywhere in the xml with the exact attributes and children. If the response does contain valid xml and does contain the exact node, call the errorFunc with the msg.

    node

    the XML node to search for in the response

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  9. final def ##(): Int
    Definition Classes
    AnyRef → Any
  10. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def \(label: String, msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test that the server response contains a node with a particular label as a direct child.

    Test that the server response contains a node with a particular label as a direct child. If the response does not contain valid xml or does not contain the node, call the errorFunc with the msg

    label

    the label for the XML node to search for in the response

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  12. def \(node: Node, msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test that the server response contains a particular node as a direct child with the exact attributes and children.

    Test that the server response contains a particular node as a direct child with the exact attributes and children. If the response does not contain valid xml or does not contain the exact node, call the errorFunc with the msg.

    node

    the XML node to search for in the response

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  13. def \\(label: String, msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test that the server response contains a node with a particular label anywhere in the xml.

    Test that the server response contains a node with a particular label anywhere in the xml. If the response does not contain valid xml or does not contain the node, call the errorFunc with the msg

    label

    the label for the XML node to search for in the response

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  14. def \\(node: Node, msg: ⇒ String)(implicit errorFunc: ReportFailure): SelfType

    Test that the server response contains a particular node anywhere in the xml with the exact attributes and children.

    Test that the server response contains a particular node anywhere in the xml with the exact attributes and children. If the response does not contain valid xml or does not contain the exact node, call the errorFunc with the msg.

    node

    the XML node to search for in the response

    msg

    the String to report as an error

    errorFunc

    the error reporting thing.

    Definition Classes
    BaseResponseResponse
  15. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  16. val baseUrl: String
    Definition Classes
    BaseResponseBaseGetPoster
  17. val body: Box[Array[Byte]]
    Definition Classes
    BaseResponse
  18. lazy val bodyAsString: Box[String]

    The response body as a UTF-8 encoded String

    The response body as a UTF-8 encoded String

    Definition Classes
    BaseResponse
  19. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. val code: Int
    Definition Classes
    BaseResponse
  21. lazy val contentType: String

    The content type header of the response

    The content type header of the response

    Definition Classes
    BaseResponse
  22. def delete(url: String, params: (String, Any)*)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP DELETE with a newly minted httpClient

    Perform an HTTP DELETE with a newly minted httpClient

    url

    the URL to make the request on

    params

    the parameters to pass

    Definition Classes
    GetPosterHelper
  23. def delete(url: String, httpClient: HttpClient, headers: List[(String, String)], faux_params: (String, Any)*)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP DELETE

    Perform an HTTP DELETE

    url

    - the URL to append to the baseUrl

    headers

    - any additional headers to include with the request

    faux_params

    - the request parameters to include with the request

    Definition Classes
    BaseGetPoster
  24. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  26. def filter(f: (FuncType) ⇒ Unit): FuncType

    the Response has a filter method for chaining in a for comprehension.

    the Response has a filter method for chaining in a for comprehension. Note that the filter method does *NOT* have to return a Boolean, any expression (e.g., an assertion)

    Definition Classes
    BaseResponseResponse
  27. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def foreach(f: (FuncType) ⇒ Unit): Unit

    the Response has a foreach method for chaining in a for comprehension

    the Response has a foreach method for chaining in a for comprehension

    Definition Classes
    BaseResponseResponse
  29. def get(url: String, params: (String, Any)*)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP GET with a newly minted httpClient

    Perform an HTTP GET with a newly minted httpClient

    url

    the URL to make the request on

    params

    the parameters to pass

    Definition Classes
    GetPosterHelper
  30. def get(url: String, httpClient: HttpClient, headers: List[(String, String)], faux_params: (String, Any)*)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP GET

    Perform an HTTP GET

    url

    - the URL to append to the baseUrl

    headers

    - any additional headers to include with the request

    faux_params

    - the request parameters to include with the request

    Definition Classes
    BaseGetPoster
  31. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  32. def getOrFail(success: Boolean, msg: String, errorFunc: ReportFailure): SelfType
    Definition Classes
    BaseResponse
  33. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  34. val headers: Map[String, List[String]]
    Definition Classes
    BaseResponseResponse
  35. lazy val html5AsXml: Box[Elem]
    Definition Classes
    BaseResponse
  36. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  37. implicit def jsonToRequestEntity(body: JValue): RequestEntity
    Definition Classes
    BaseGetPoster
  38. val msg: String
    Definition Classes
    BaseResponse
  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. final def notify(): Unit
    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  42. def post(url: String, body: Array[Byte], contentType: String)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP POST with a newly minted httpClient

    Perform an HTTP POST with a newly minted httpClient

    url

    the URL to make the request on

    body

    the bytes to POST to the server

    contentType

    the content type of the message

    Definition Classes
    GetPosterHelper
  43. def post[RT](url: String, xml: RT)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType, bodyToRequestEntity: (RT) ⇒ RequestEntity): ResponseType

    Perform an HTTP POST with a newly minted httpClient

    Perform an HTTP POST with a newly minted httpClient

    url

    the URL to make the request on

    xml

    the XML to POST to the server

    Definition Classes
    GetPosterHelper
  44. def post(url: String, params: (String, Any)*)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP POST with a newly minted httpClient

    Perform an HTTP POST with a newly minted httpClient

    url

    the URL to make the request on

    params

    the parameters to pass

    Definition Classes
    GetPosterHelper
  45. def post(url: String, httpClient: HttpClient, headers: List[(String, String)], body: Array[Byte], contentType: String)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP POST with a pile of bytes in the body

    Perform an HTTP POST with a pile of bytes in the body

    url

    - the URL to append to the baseUrl

    headers

    - any additional headers to include with the request

    body

    - the pile of bytes to POST to the target server

    contentType

    - the content type of the pile of bytes

    Definition Classes
    BaseGetPoster
  46. def post[RT](url: String, httpClient: HttpClient, headers: List[(String, String)], body: RT)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType, bodyToRequestEntity: (RT) ⇒ RequestEntity): ResponseType

    Perform an HTTP POST with an XML body

    Perform an HTTP POST with an XML body

    url

    - the URL to append to the baseUrl

    headers

    - any additional headers to include with the request

    body

    - the xml to post

    Definition Classes
    BaseGetPoster
  47. def post(url: String, httpClient: HttpClient, headers: List[(String, String)], faux_params: (String, Any)*)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP POST

    Perform an HTTP POST

    url

    - the URL to append to the baseUrl

    headers

    - any additional headers to include with the request

    faux_params

    - the request parameters to include with the request

    Definition Classes
    BaseGetPoster
  48. def put(url: String, body: Array[Byte], contentType: String)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP POST with a newly minted httpClient

    Perform an HTTP POST with a newly minted httpClient

    url

    the URL to make the request on

    body

    the bytes to POST to the server

    contentType

    the content type of the message

    Definition Classes
    GetPosterHelper
  49. def put[RT](url: String, xml: RT)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType, bodyToRequestEntity: (RT) ⇒ RequestEntity): ResponseType

    Perform an HTTP PUT with a newly minted httpClient

    Perform an HTTP PUT with a newly minted httpClient

    url

    the URL to make the request on

    xml

    the XML to PUT to the server

    Definition Classes
    GetPosterHelper
  50. def put(url: String, httpClient: HttpClient, headers: List[(String, String)], body: Array[Byte], contentType: String)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP PUT with a pile of bytes in the body

    Perform an HTTP PUT with a pile of bytes in the body

    url

    - the URL to append to the baseUrl

    headers

    - any additional headers to include with the request

    body

    - the pile of bytes to POST to the target server

    contentType

    - the content type of the pile of bytes

    Definition Classes
    BaseGetPoster
  51. def put[RT](url: String, httpClient: HttpClient, headers: List[(String, String)], body: RT)(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType, bodyToRequestEntity: (RT) ⇒ RequestEntity): ResponseType

    Perform an HTTP PUT with an XML body

    Perform an HTTP PUT with an XML body

    url

    - the URL to append to the baseUrl

    headers

    - any additional headers to include with the request

    body

    - the xml to post

    Definition Classes
    BaseGetPoster
  52. def put(url: String, httpClient: HttpClient, headers: List[(String, String)])(implicit capture: (String, HttpClient, HttpMethodBase) ⇒ ResponseType): ResponseType

    Perform an HTTP PUT

    Perform an HTTP PUT

    url

    - the URL to append to the baseUrl

    headers

    - any additional headers to include with the request

    Definition Classes
    BaseGetPoster
  53. implicit def responseCapture(fullUrl: String, httpClient: HttpClient, getter: HttpMethodBase): Box[TheResponse]
    Definition Classes
    ToBoxTheResponse
  54. def slurpApacheHeaders(in: Array[Header]): Map[String, List[String]]
    Attributes
    protected
    Definition Classes
    BaseGetPoster
  55. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  56. val theHttpClient: HttpClient
    Definition Classes
    BaseResponseGetPosterHelper
  57. def toString(): String
    Definition Classes
    AnyRef → Any
  58. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. def withFilter(f: (FuncType) ⇒ Unit): FuncType
    Definition Classes
    BaseResponse
  62. lazy val xml: Box[Elem]

    Get the body of the response as XML

    Get the body of the response as XML

    Definition Classes
    BaseResponseResponse
  63. def xmlMatch(findFunc: (Elem) ⇒ NodeSeq, filterFunc: (Node) ⇒ Boolean): Boolean
    Definition Classes
    BaseResponse
  64. implicit def xmlToRequestEntity(body: NodeSeq): RequestEntity
    Definition Classes
    BaseGetPoster

Inherited from ToBoxTheResponse

Inherited from BaseResponse

Inherited from GetPosterHelper

Inherited from BaseGetPoster

Inherited from Response

Inherited from AnyRef

Inherited from Any

Ungrouped