We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I need to inject cookies and headers in each request. How possible it's using FinestWebView?
Also, I need to do something in shouldOverrideUrlLoading, how to achieve this?
shouldOverrideUrlLoading
The text was updated successfully, but these errors were encountered:
About Cookies - you can do it via CookieManager. For example:
fun setWebViewSession(url: String, onSessionSet: (() -> Unit)?) { doAsync { // Refresh login data ... // Build and execute request ... val response = httpClient.newCall(request).execute() // Obtain and sync cookies val cookies = response.headers().values("Set-Cookie") CookieSyncManager.createInstance(application) CookieSyncManager.getInstance().startSync() val cookieManager = CookieManager.getInstance() cookieManager.removeAllCookie() cookies.forEach { cookieManager.setCookie(URL(url).host, it) } CookieSyncManager.getInstance().sync() onSessionSet?.invoke() } }
This code snipped is about loggin user, that's why I make a request before setting cookies. For your purposes it should look fimilar.
Sorry, something went wrong.
No branches or pull requests
I need to inject cookies and headers in each request. How possible it's using FinestWebView?
Also, I need to do something in
shouldOverrideUrlLoading
, how to achieve this?The text was updated successfully, but these errors were encountered: