Get response headers in webview in shouldInterceptRequest in Android
<p>I am trying to get response headers in webview when I post some url to the server. I am using shouldInterceptRequest method.</p>

<pre><code>@Override 
        public WebResourceResponse shouldInterceptRequest(final WebView view, final WebResourceRequest request) {

            if(request.getUrl().toString().contains(SMConstant.INTERCEPTED_URL)){
                if(interceptFlag==0){
                    ((Activity) mContext).runOnUiThread(new Runnable(){
                        @Override
                        public void run() {
                            view.postUrl(request.getUrl().toString(), EncodingUtils.getBytes(postData, "UTF-8"));
                        }
                    });
                    interceptFlag++;
                }

            }
            return super.shouldInterceptRequest(view, request);
        }
</code></pre>

<p>This method return WebResourceResponse object. But I am not getting  the way how to get the response headers out of it.</p>

<p>By default <code>return super.shouldInterceptRequest(view, request);</code> returns null.</p>

<p>so , what should be done so that actual webview response should be captured.</p>