Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
val dispatcher = object : Dispatcher() {
override fun dispatch(request: RecordedRequest): MockResponse {
return when {
request.path == "/v1/token" -> MockResponse().setResponseCode(200).setBody(getJson("json/token.json"))
request.path == "v1/events" -> MockResponse().setResponseCode(200).setBody(getJson("json/eventos.json"))
else -> MockResponse().setResponseCode(404)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment