The dispatcher
# squarelibraries
j
The dispatcher
j
This is the mockwebserver URL
http://localhost:8000/api/example1 this is from the HttpLogginInterceptor...
And my Dispatcher is :
Copy code
private val dispatcher: Dispatcher = object : Dispatcher() {
        @Throws(InterruptedException::class)
        override fun dispatch(request: RecordedRequest): MockResponse {
            if (request.path == "<http://localhost:8000/api/example1>") {
                return MockResponse()
                    .setResponseCode(404)

            }
            return MockResponse().setResponseCode(404)
        }
    }
And when debugging the dispatcher of the webmockserver the body is null but the code is 200 😕
With enqueue looks like it gets the 404, but once I do the call and use mockWebServer.requestCount is 0... so is not triggering the calls