Skip to content

Instantly share code, notes, and snippets.

View humayuntanwar's full-sized avatar

Humayun Tanwar humayuntanwar

  • FAB
  • Abu Dhabi
View GitHub Profile
@humayuntanwar
humayuntanwar / EcryptRequestParameters
Created April 18, 2020 14:09
This method intercepts your outgoing request to encrypt its parameters
/** this method builds a http client with trusted certified and verified host name and global response interceptors
* encrypt the encoded parameters and sets the user agent header
* @return okhttpclient
*/
private val safeOkHttpClient: OkHttpClient
get() {
try {
val trustAllCerts = arrayOf<TrustManager>(
object : X509TrustManager {
@humayuntanwar
humayuntanwar / RetrofitCallback.kt
Last active July 5, 2019 06:39
Custom Retrofit CallBack Class to handle Custom Responses.
import android.app.Dialog
import android.content.Context
import android.util.Log
import android.view.View
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response