buildTestConnection
Invoke block with the given builder and construct a new TestConnection
Example:
val testEngine = buildTestConnection {
expect {
request {
url.host = "myhost"
headers.append("x-foo", "bar")
}
response = HttpResponse(HttpStatusCode.OK, Headers.Empty, HttpBody.Empty)
}
}
Content copied to clipboard