FakeInterceptor

class FakeInterceptor(latency: Long = 100, responseCode: Int = 200, fail: Boolean = false, failMessage: String = "Something went wrong", headers: HashMap<String, String> = hashMapOf( Pair( "Content-Type", "application/json" ) ), message: String = "Fake Response", contentType: String = "application/json", jsonObject: JSONObject = JSONObject().accumulate( "message", "This is a fake response" )) : Interceptor

Constructors

Link copied to clipboard
constructor(latency: Long = 100, responseCode: Int = 200, fail: Boolean = false, failMessage: String = "Something went wrong", headers: HashMap<String, String> = hashMapOf( Pair( "Content-Type", "application/json" ) ), message: String = "Fake Response", contentType: String = "application/json", jsonObject: JSONObject = JSONObject().accumulate( "message", "This is a fake response" ))

Functions

Link copied to clipboard
open override fun intercept(chain: Interceptor.Chain): Response