net.liftweb.http.testing

HttpResponse

class HttpResponse extends BaseResponse with ToResponse with TestResponse

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

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HttpResponse
  2. TestResponse
  3. ToResponse
  4. BaseResponse
  5. GetPosterHelper
  6. BaseGetPoster
  7. Response
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

Type Members

  1. type FuncType = HttpResponse

    Definition Classes
    TestResponseResponse
  2. type ResponseType = TestResponse

    Definition Classes
    ToResponse
  3. type SelfType = HttpResponse

    Definition Classes
    TestResponseResponse

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: AnyRef): Boolean

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

    Definition Classes
    Any
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. final def ##(): Int

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

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

    Definition Classes
    Any
  13. 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
  14. 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
  15. 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
  16. 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
  17. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  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. lazy val contentType: String

    The content type header of the response

    The content type header of the response

    Definition Classes
    BaseResponse
  21. 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
  22. 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
  23. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  25. 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
  26. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  27. 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
  28. 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
  29. 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
  30. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  31. def getOrFail(success: Boolean, msg: String, errorFunc: ReportFailure): SelfType

    Definition Classes
    BaseResponse
  32. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  33. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  34. implicit def jsonToRequestEntity(body: JValue): RequestEntity

    Definition Classes
    BaseGetPoster
  35. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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
  47. 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
  48. 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
  49. implicit def responseCapture(fullUrl: String, httpClient: HttpClient, getter: HttpMethodBase): ResponseType

    Definition Classes
    ToResponse
  50. def slurpApacheHeaders(in: Array[Header]): Map[String, List[String]]

    Attributes
    protected
    Definition Classes
    BaseGetPoster
  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  52. def toString(): String

    Definition Classes
    AnyRef → Any
  53. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  56. lazy val xml: Box[Elem]

    Get the body of the response as XML

    Get the body of the response as XML

    Definition Classes
    BaseResponseResponse
  57. def xmlMatch(findFunc: (Elem) ⇒ NodeSeq, filterFunc: (Node) ⇒ Boolean): Boolean

    Definition Classes
    BaseResponse
  58. implicit def xmlToRequestEntity(body: NodeSeq): RequestEntity

    Definition Classes
    BaseGetPoster

Inherited from TestResponse

Inherited from ToResponse

Inherited from BaseResponse

Inherited from GetPosterHelper

Inherited from BaseGetPoster

Inherited from Response

Inherited from AnyRef

Inherited from Any

Ungrouped