class HttpResponse extends BaseResponse with ToResponse with TestResponse
The response to an HTTP request, as long as the server responds with *SOMETHING*
- Alphabetic
- By Inheritance
- HttpResponse
- TestResponse
- ToResponse
- BaseResponse
- GetPosterHelper
- BaseGetPoster
- Response
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Type Members
-
type
FuncType = HttpResponse
- Definition Classes
- TestResponse → Response
-
type
ResponseType = TestResponse
- Definition Classes
- ToResponse
-
type
SelfType = HttpResponse
- Definition Classes
- TestResponse → Response
Value Members
-
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
- BaseResponse → Response
-
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
- BaseResponse → Response
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
- BaseResponse → Response
-
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
- BaseResponse → Response
-
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
- BaseResponse → Response
-
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
- BaseResponse → Response
-
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
- BaseResponse → Response
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
- BaseResponse → Response
-
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
- BaseResponse → Response
-
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
- BaseResponse → Response
-
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
- BaseResponse → Response
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
baseUrl: String
- Definition Classes
- BaseResponse → BaseGetPoster
-
val
body: Box[Array[Byte]]
- Definition Classes
- BaseResponse
-
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
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
code: Int
- Definition Classes
- BaseResponse
-
lazy val
contentType: String
The content type header of the response
The content type header of the response
- Definition Classes
- BaseResponse
-
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
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
- BaseResponse → Response
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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
- BaseResponse → Response
-
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
-
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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getOrFail(success: Boolean, msg: String, errorFunc: ReportFailure): SelfType
- Definition Classes
- BaseResponse
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
val
headers: Map[String, List[String]]
- Definition Classes
- BaseResponse → Response
-
lazy val
html5AsXml: Box[Elem]
- Definition Classes
- BaseResponse
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
implicit
def
jsonToRequestEntity(body: JValue): RequestEntity
- Definition Classes
- BaseGetPoster
-
val
msg: String
- Definition Classes
- BaseResponse
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
implicit
def
responseCapture(fullUrl: String, httpClient: HttpClient, getter: HttpMethodBase): ResponseType
- Definition Classes
- ToResponse
-
def
slurpApacheHeaders(in: Array[Header]): Map[String, List[String]]
- Attributes
- protected
- Definition Classes
- BaseGetPoster
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
theHttpClient: HttpClient
- Definition Classes
- BaseResponse → GetPosterHelper
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withFilter(f: (FuncType) ⇒ Unit): FuncType
- Definition Classes
- BaseResponse
-
lazy val
xml: Box[Elem]
Get the body of the response as XML
Get the body of the response as XML
- Definition Classes
- BaseResponse → Response
-
def
xmlMatch(findFunc: (Elem) ⇒ NodeSeq, filterFunc: (Node) ⇒ Boolean): Boolean
- Definition Classes
- BaseResponse
-
implicit
def
xmlToRequestEntity(body: NodeSeq): RequestEntity
- Definition Classes
- BaseGetPoster