How to inspect HTTP requests made by WebViews

前端 未结 3 1331
野的像风
野的像风 2021-01-04 18:32

As you know, a lot of request (images, scripts, AJAX, etc.) are send when loading a single page. So I need to get all those request and inspect them.

So the question

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-04 19:14

    The best you can get in your app is the WebViewClient.shouldInterceptRequest method, but that only has the URL. You currently can't get any of the things you've listed.

    For debugging you can use Chrome DevTools if you're using Android 4.4.

提交回复
热议问题