Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddHttpHeader does not work #52

Closed
ashraful29 opened this issue Apr 29, 2016 · 1 comment
Closed

AddHttpHeader does not work #52

ashraful29 opened this issue Apr 29, 2016 · 1 comment

Comments

@ashraful29
Copy link

AddHttpHeader does not work when use post url in Webview

@ocram
Copy link
Contributor

ocram commented Apr 30, 2016

Thank you very much!

As you can see here, it's actually (and unfortunately) expected behaviour and documented accordingly.

I'm afraid the only solution to this problem would be using WebViewClient#shouldInterceptRequest (available on API levels 11+ and 21+, respectively) instead of WebViewClient#shouldOverrideUrlLoading.

But in that case, we would have to do all resource requests (pages, images, CSS, JS, etc.) ourselves, i.e. download them with a HTTP client.

But you can do this yourself already without changing this library: Just implement those WebViewClient methods yourself and apply your custom WebViewClient instance via setWebViewClient.

@ocram ocram closed this as completed May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants