Hi guys, how would we use mockengine for mocking t...
# ktor
n
Hi guys, how would we use mockengine for mocking the response from an endpoint, if some one could give an example or some kind of explanation would be good
c
first create a mock client with something like this
Copy code
val client = run {
        HttpClient(MockEngine) {
            engine {
                addHandler { r ->
and then you inject it into your classes and they use it to make the http request
👍 1