I am trying to extract some info from a website which requires login to access said page. I created a webview to allow to user to log in first.
The question is, how to use the authorization info from that webview in other HTTP requests?
I am trying to extract some info from a website which requires login to access said page. I created a webview to allow to user to log in first.
The question is, how to use the authorization info from that webview in other HTTP requests?
You can extract the cookies from the page and use them in later requests.
@Override
public void onPageFinished(WebView view, String url){
String cookies = CookieManager.getInstance().getCookie(url);
Log.d(TAG, "All the cookies in a string:" + cookies);
}
see more here: Android - extracting cookies after login in webview