this is my request function ```override fun onRequ...
# android
s
this is my request function
Copy code
override fun onRequestOtp(phone: String, otpListener: AuthContract.OtpListener) {
        val otp = retrofit.create(ApiRequest::class.java).requestOtp(phone)
        otp.enqueue(object : Callback<OtpResponse?> {
            override fun onResponse(call: Call<OtpResponse?>, response: Response<OtpResponse?>) {
                if (response?.isSuccessful) {
                    otpListener.onOtpReceived(response.body()?.code)
                }
            }

            override fun onFailure(call: Call<OtpResponse?>, t: Throwable) {
                authView.onError(R.string.error_results)
            }
        })
    }