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
8
8
import androidx.annotation.IdRes
9
9
import androidx.appcompat.app.AppCompatActivity
10
10
import 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.*
14
13
import kotlinx.coroutines.*
15
14
import okhttp3.CertificatePinner
16
15
import okhttp3.OkHttpClient
@@ -163,9 +162,11 @@ class MainActivity : AppCompatActivity() {
163
162
val context = SSLContext .getInstance(" TLS" )
164
163
context.init (null , trustManagerFactory.trustManagers, null )
165
164
166
- val requestQueue = Volley .newRequestQueue(this @MainActivity,
167
- HurlStack (null , context.socketFactory)
165
+ val requestQueue = RequestQueue (
166
+ NoCache (),
167
+ BasicNetwork (HurlStack (null , context.socketFactory))
168
168
)
169
+ requestQueue.start()
169
170
170
171
// Make a request using that client:
171
172
val stringRequest = StringRequest (
You can’t perform that action at this time.
0 commit comments