M
M
mitaichik2020-11-03 14:07:45
Android
mitaichik, 2020-11-03 14:07:45

WebView - how to reload a POST page?

Hello.

Tell me how to correctly reload the page in WebView in onReceivedError / onReceivedHttpError if it was loaded with an error?

In more detail - Acquiring is built into the application, respectively, the entire process of receiving money (entering a card, entering a code from SMS) takes place in WebView. And from time to time there are errors at banks - starting from all sorts of net::ERR_CONNECTION_ABORTED / net::ERR_CONNECTION_TIMED_OUT / net::ERR_NAME_NOT_RESOLVED ending with http. mistakes.

There would be an ordinary browser - it would be enough to reload the page (chrome seems to even automatically reload). And in WebView - xs how to do it.

I tried webView.reload () - it does not work with POST requests (and in banks there are mostly only them), I tried webView.loadUrl (failUrl); - does not save POST (it's understandable), tried webView.loadUrl( "javascript:window.location.reload( true )" ); - also does not send POST again.

Tell me how to be?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question