MockHttpClientCall

class MockHttpClientCall(client: HttpClient) : HttpClientCall

A mock implementation of HttpClientCall that returns a predefined response without making an actual network request.

Constructed by createMockHttpClientCall with the original request data and a synthetic response. Both request and response are set immediately in the secondary constructor so the call is fully usable upon creation.

Constructors

Link copied to clipboard
constructor(client: HttpClient)
constructor(client: HttpClient, mockRequestData: HttpRequestData, mockResponseData: HttpResponseData)

Properties

Link copied to clipboard
val attributes: Attributes
Link copied to clipboard
val client: HttpClient
Link copied to clipboard
Link copied to clipboard
lateinit var request: HttpRequest
Link copied to clipboard
lateinit var response: HttpResponse

Functions

Link copied to clipboard
suspend fun body(info: TypeInfo): Any
Link copied to clipboard
suspend fun bodyNullable(info: TypeInfo): Any?
Link copied to clipboard
open override fun toString(): String