File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
app/src/main/java/tech/httptoolkit/pinning_demo Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,8 @@ import android.widget.Toast
88import androidx.annotation.IdRes
99import androidx.appcompat.app.AppCompatActivity
1010import androidx.core.content.ContextCompat
11- import com.android.volley.toolbox.HurlStack
12- import com.android.volley.toolbox.StringRequest
13- import com.android.volley.toolbox.Volley
11+ import com.android.volley.RequestQueue
12+ import com.android.volley.toolbox.*
1413import kotlinx.coroutines.*
1514import okhttp3.CertificatePinner
1615import okhttp3.OkHttpClient
@@ -163,9 +162,11 @@ class MainActivity : AppCompatActivity() {
163162 val context = SSLContext .getInstance(" TLS" )
164163 context.init (null , trustManagerFactory.trustManagers, null )
165164
166- val requestQueue = Volley .newRequestQueue(this @MainActivity,
167- HurlStack (null , context.socketFactory)
165+ val requestQueue = RequestQueue (
166+ NoCache (),
167+ BasicNetwork (HurlStack (null , context.socketFactory))
168168 )
169+ requestQueue.start()
169170
170171 // Make a request using that client:
171172 val stringRequest = StringRequest (
You can’t perform that action at this time.
0 commit comments