0

I login by webview and I need to get headers after logging in. I found, that i can get it by using a method "WebResourceRequest.requestHeaders":

 override fun shouldInterceptRequest(
                view: WebView?,
                request: WebResourceRequest?
            ): WebResourceResponse? {
                request.requestHeaders // this method
                return super.shouldInterceptRequest(view, request)
            }

but it allows only for >=21 api version. My application has 16 minversion, are there any other ways to get headers from webview request?

Sawyerhard
  • 53
  • 9

1 Answers1

1

You haven't clearly described your problem. I assume you want to change minimum api of your application in order to use method "WebResourceRequest.requestHeaders". For this you can do this:

  1. Right click on your project file
  2. Select "Open Module Settings"
  3. Go to the "Flavors" tab.

enter image description here

  1. Select the "Min Sdk Version" from the drop down list

For further help you can refer to this post. Changing API level Android Studio

Hanzla
  • 172
  • 3
  • 12