trait RequestKit extends ClientBuilder with BaseGetPoster with GetPosterHelper with ToBoxTheResponse
Mix this trait into your test so you can make HTTP requests on a target
- Alphabetic
- By Inheritance
- RequestKit
- ToBoxTheResponse
- GetPosterHelper
- BaseGetPoster
- ClientBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
ResponseType = Box[TheResponse]
- Definition Classes
- ToBoxTheResponse
Abstract Value Members
-
abstract
def
baseUrl: String
The base URL for all GET and POST requests
The base URL for all GET and POST requests
- Definition Classes
- RequestKit → BaseGetPoster
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
buildBasicAuthClient(name: String, pwd: String): HttpClient
Create a new HTTP client that does BASIC AUTH with username/pwd
Create a new HTTP client that does BASIC AUTH with username/pwd
- Definition Classes
- ClientBuilder
-
def
buildNoAuthClient: HttpClient
Create a new HTTP client that does not do any form of AUTH
Create a new HTTP client that does not do any form of AUTH
- Definition Classes
- ClientBuilder
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
implicit
def
jsonToRequestEntity(body: JValue): RequestEntity
- Definition Classes
- BaseGetPoster
-
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): Box[TheResponse]
- Definition Classes
- ToBoxTheResponse
-
def
slurpApacheHeaders(in: Array[Header]): Map[String, List[String]]
- Attributes
- protected
- Definition Classes
- BaseGetPoster
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
theHttpClient: HttpClient
Create the HTTP client for a new get/post request
Create the HTTP client for a new get/post request
- Definition Classes
- ClientBuilder
-
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( ... )
-
implicit
def
xmlToRequestEntity(body: NodeSeq): RequestEntity
- Definition Classes
- BaseGetPoster